Skip to content

Commit

Permalink
πŸ› fix footer links getting deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
ctcpip committed Aug 20, 2024
1 parent 580a51e commit f3662e6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/bad-linebreaks.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ export function findBadStuff(file, fix = false) {

// we don't need to build this array if `fix` is `false`, but this keeps complexity down
o.push(tokenContent);
}

for (const k of Object.keys(tokens.links)) {
// marked treats footer links as special. it's a named property on the tokens array, and links do not have the properties of tokens.
// so we just add them as is
o.push(`[${k}]: ${tokens.links[k].href}\n`);
}

return {
Expand Down

0 comments on commit f3662e6

Please sign in to comment.