Skip to content

Commit

Permalink
依据 eslint 修正接口调用、符号
Browse files Browse the repository at this point in the history
  • Loading branch information
IronBlood committed Jan 19, 2021
1 parent ddf3fc1 commit 96a8085
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/parsers/codeblockParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ export default async function(line, states) {
const lang = line.substring(4).toLowerCase();
const langstr = langSets.has(lang) ? lang : langFallback;

return `<pre><code class=\"language-${langstr}\">`;
return `<pre><code class="language-${langstr}">`;
}
} else {
// 一般情况则追加原始行以及换行符到 states.code.source 中
return [escape(line), "\n"];
return [escapeHtml(line), "\n"];
}
};
}

2 changes: 1 addition & 1 deletion src/parsers/plainTextParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ import { escapeHtml } from "../utils.js"
export default async function(line, states) {
states;
return escapeHtml(line);
};
}

0 comments on commit 96a8085

Please sign in to comment.