mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-12-27 11:08:30 +00:00
Typescript linter fixes
This commit is contained in:
parent
773eef5126
commit
110be607c5
|
@ -79,7 +79,7 @@ function localCommunityLinkParser(md: MarkdownIt) {
|
||||||
if (state.tokens[i].type !== "inline") {
|
if (state.tokens[i].type !== "inline") {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const inlineTokens = state.tokens[i].children;
|
const inlineTokens: Token[] = state.tokens[i].children || [];
|
||||||
for (let j = inlineTokens.length - 1; j >= 0; j--) {
|
for (let j = inlineTokens.length - 1; j >= 0; j--) {
|
||||||
if (
|
if (
|
||||||
inlineTokens[j].type === "text" &&
|
inlineTokens[j].type === "text" &&
|
||||||
|
@ -93,7 +93,7 @@ function localCommunityLinkParser(md: MarkdownIt) {
|
||||||
|
|
||||||
let linkClass = "community-link";
|
let linkClass = "community-link";
|
||||||
|
|
||||||
for (const match: RegExpMatchArray of matches) {
|
for (const match of matches) {
|
||||||
// If there is plain text before the match, add it as a separate token
|
// If there is plain text before the match, add it as a separate token
|
||||||
if (match.index !== undefined && match.index > lastIndex) {
|
if (match.index !== undefined && match.index > lastIndex) {
|
||||||
const textToken = new state.Token("text", "", 0);
|
const textToken = new state.Token("text", "", 0);
|
||||||
|
|
Loading…
Reference in a new issue