Skip to content

Commit

Permalink
Remove spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
kepano committed Jan 10, 2025
1 parent 7b72688 commit ee81649
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utils/markdown-converter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ export function createMarkdownContent(content: string, url: string) {
return content;
}
});

// Update the reference list rule
turndownService.addRule('referenceList', {
filter: (node: Node): boolean => {
Expand Down Expand Up @@ -925,15 +925,15 @@ export function createMarkdownContent(content: string, url: string) {

// Remove any consecutive newlines more than two
markdown = markdown.replace(/\n{3,}/g, '\n\n');

// Append footnotes at the end of the document
if (Object.keys(footnotes).length > 0) {
markdown += '\n\n---\n\n';
for (const [id, content] of Object.entries(footnotes)) {
markdown += `[^${id}]: ${content}\n\n`;
}
}

// Clear the footnotes object for the next conversion
Object.keys(footnotes).forEach(key => delete footnotes[key]);

Expand Down

0 comments on commit ee81649

Please sign in to comment.