Skip to content

Commit

Permalink
what again? more verbose cleaning?
Browse files Browse the repository at this point in the history
  • Loading branch information
kmlbgn committed Jan 4, 2024
1 parent 32d5e6b commit 1ad7081
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ function doLinkFixes(
): string {
const linkRegExp = /\[.*?\]\([^\)]*\)/g;

logDebug("markdown before link fixes", markdown);
logDebug("Markdown before link fix: ", markdown);
let match: RegExpExecArray | null;

// since we're going to make changes to the markdown,
Expand All @@ -239,7 +239,7 @@ function doLinkFixes(
config.plugins.some(plugin => {
if (!plugin.linkModifier) return false;
if (plugin.linkModifier.match.exec(originalLinkMarkdown) === null) {
verbose(`Link parsing: ["${plugin.name}"] Did not match this url`);
verbose(`Link parsing: [${plugin.name}] Did not match this url`);
return false;
}
const newMarkdown = plugin.linkModifier.convert(
Expand All @@ -250,11 +250,11 @@ function doLinkFixes(
if (newMarkdown !== originalLinkMarkdown) {
markdown = markdown.replace(originalLinkMarkdown, newMarkdown);
verbose(
`Link parsing: ["${plugin.name}"] Converted "${originalLinkMarkdown}" to "${newMarkdown}"`
`Link parsing: [${plugin.name}] Converted "${originalLinkMarkdown}" to "${newMarkdown}"`
);
return true; // the first plugin that matches and does something wins
} else {
verbose(`Link parsing: ["${plugin.name}"] URL unchanged`);
verbose(`Link parsing: [${plugin.name}] URL unchanged`);
return false;
}
});
Expand Down

0 comments on commit 1ad7081

Please sign in to comment.