add functino to clean up title formatting
parent
fcda45422c
commit
34f1b9833b
|
|
@ -34,12 +34,22 @@ function removeEmojiMetadata(content) {
|
|||
return content.replace(pattern, '');
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up title formatting.
|
||||
*/
|
||||
function cleanTitle(content) {
|
||||
// Remove duplicate # from titles (e.g., "# # Title" -> "# Title")
|
||||
content = content.replace(/^#\s+#\s+(.+)$/m, '# $1');
|
||||
return content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert relative links to GitHub URLs.
|
||||
*/
|
||||
function convertRelativeLinks(content, pluginName) {
|
||||
const baseUrl = `https://github.com/influxdata/influxdb3_plugins/blob/master/influxdata/${pluginName}/`;
|
||||
const rootUrl = 'https://github.com/influxdata/influxdb3_plugins/blob/master/';
|
||||
const rootUrl =
|
||||
'https://github.com/influxdata/influxdb3_plugins/blob/master/';
|
||||
|
||||
// Convert relative README links (../../README.md, ../README.md, etc.)
|
||||
content = content.replace(
|
||||
|
|
|
|||
Loading…
Reference in New Issue