Skip to content

Commit

Permalink
make prettier happy
Browse files Browse the repository at this point in the history
  • Loading branch information
aalear committed Jul 13, 2022
1 parent 3879b30 commit cf4b733
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/rich-text/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ const nodes: {
title: { default: null },
additionalClasses: { default: "" },
},
parseDOM: [
parseDOM: [
{
tag: "a.s-tag",
getAttrs(dom: HTMLElement) {
Expand All @@ -447,7 +447,7 @@ const nodes: {
additionalClasses: Array.from(dom.classList).join(" "),
tagType: dom.getAttribute("tagtype"),
tagName: dom.textContent,
}
};
},
},
],
Expand All @@ -458,9 +458,9 @@ const nodes: {
tagType: node.attrs.tagType as string,
href: node.attrs.href as string,
title: node.attrs.title as string,
class: `s-tag ${node.attrs.additionalClasses as string}`
class: `s-tag ${node.attrs.additionalClasses as string}`,
},
node.attrs.tagName
node.attrs.tagName,
];
},
},
Expand Down
7 changes: 4 additions & 3 deletions src/shared/markdown-it/tag-link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,13 @@ function parse_tag_link(
token.attrSet("href", rendered.link);
token.attrSet("title", rendered.linkTitle);
token.attrSet("additionalClasses", additionalClasses.join(" "));
}
else {
} else {
// We don't want to crash the parsing process here since we can still display a passable version of the tag link.
// However, we should at least log a console error.
// eslint-disable-next-line no-console
console.error(`Unable to fully render taglink for [${tagName}] due to invalid response from options.renderer.`);
console.error(
`Unable to fully render taglink for [${tagName}] due to invalid response from options.renderer.`
);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/shared/markdown-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ const customMarkdownParserTokens: MarkdownParser["tokens"] = {
tagType: tok.attrGet("tagType"),
href: tok.attrGet("href"),
additionalClasses: tok.attrGet("additionalClasses"),
title: tok.attrGet("title")
title: tok.attrGet("title"),
}),
},

Expand Down

0 comments on commit cf4b733

Please sign in to comment.