Statisfy eslint
This commit is contained in:
parent
21755ac9e9
commit
6c2d8f357e
2 changed files with 13 additions and 13 deletions
|
@ -3,7 +3,6 @@
|
|||
|
||||
/*= require lib/utils/common_utils */
|
||||
|
||||
|
||||
(() => {
|
||||
const gfmRules = {
|
||||
// The filters referenced in lib/banzai/pipeline/gfm_pipeline.rb convert
|
||||
|
@ -96,11 +95,11 @@
|
|||
let lines = text.trim().split('\n');
|
||||
// Add two spaces to the front of subsequent list items lines,
|
||||
// or leave the line entirely blank.
|
||||
lines = lines.map((s) => {
|
||||
s = s.trim();
|
||||
if (s.length === 0) return '';
|
||||
lines = lines.map((l) => {
|
||||
const line = l.trim();
|
||||
if (line.length === 0) return '';
|
||||
|
||||
return ` ${s}`;
|
||||
return ` ${line}`;
|
||||
});
|
||||
|
||||
return `<dl>\n${lines.join('\n')}\n</dl>`;
|
||||
|
@ -111,20 +110,21 @@
|
|||
},
|
||||
},
|
||||
SyntaxHighlightFilter: {
|
||||
'pre.code.highlight'(el, text) {
|
||||
'pre.code.highlight'(el, t) {
|
||||
const text = t.trim();
|
||||
|
||||
let lang = el.getAttribute('lang');
|
||||
if (lang === 'plaintext') {
|
||||
lang = '';
|
||||
}
|
||||
text = text.trim();
|
||||
|
||||
// Prefixes lines with 4 spaces if the code contains triple backticks
|
||||
// Prefixes lines with 4 spaces if the code contains triple backticks
|
||||
if (lang === '' && text.match(/^```/gm)) {
|
||||
return text.split('\n').map((s) => {
|
||||
s = s.trim();
|
||||
if (s.length === 0) return '';
|
||||
return text.split('\n').map((l) => {
|
||||
const line = l.trim();
|
||||
if (line.length === 0) return '';
|
||||
|
||||
return ` ${s}`;
|
||||
return ` ${line}`;
|
||||
}).join('\n');
|
||||
}
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
replyField.val(function(_, current) {
|
||||
return current + separator + quote.join('') + "\n";
|
||||
});
|
||||
|
||||
|
||||
// Trigger autosave
|
||||
replyField.trigger('input');
|
||||
|
||||
|
|
Loading…
Reference in a new issue