Allowed FCB in lists
This commit is contained in:
parent
3c41c2ec1b
commit
c2055098a1
@ -6,18 +6,14 @@ Prism.languages.md = (function() {
|
||||
|
||||
var latex = Prism.languages.latex;
|
||||
|
||||
var lf = /\n/gm;
|
||||
|
||||
var md = {};
|
||||
md['pre gfm'] = {
|
||||
pattern: /^`{3}.*\n(?:[\s\S]*?)\n`{3} *$/gm,
|
||||
inside: {
|
||||
"md md-pre": /`{3}/,
|
||||
lf: /\n/gm
|
||||
}
|
||||
};
|
||||
md.pre = {
|
||||
pattern: /(^|(?:^|(?:^|\n)(?![ \t]*([*+\-]|\d+\.)[ \t]).*\n)\s*?\n)(\s*(?: {4}|\t).*(?:\n|$))+/g,
|
||||
lookbehind: true,
|
||||
inside: {
|
||||
lf: lf
|
||||
}
|
||||
};
|
||||
md['h1 alt'] = {
|
||||
@ -30,6 +26,28 @@ Prism.languages.md = (function() {
|
||||
inside: {
|
||||
}
|
||||
};
|
||||
for (var i = 6; i >= 1; i--) {
|
||||
md["h" + i] = {
|
||||
pattern: new RegExp("^#{" + i + "}.+$", "gm"),
|
||||
inside: {
|
||||
"md md-hash": new RegExp("^#{" + i + "} ")
|
||||
}
|
||||
};
|
||||
}
|
||||
md.li = {
|
||||
pattern: /^[ \t]*([*+\-]|\d+\.)[ \t].+(?:\n|[ \t].*\n)*/gm,
|
||||
inside: {
|
||||
"md md-li": /^[ \t]*([*+\-]|\d+\.)[ \t]/m,
|
||||
'pre gfm': /^((?: {4}|\t)+)`{3}.*\n(?:[\s\S]*?)\n\1`{3} *$/gm,
|
||||
lf: lf
|
||||
}
|
||||
};
|
||||
md.pre = {
|
||||
pattern: /(^|(?:^|(?:^|\n)(?![ \t]*([*+\-]|\d+\.)[ \t]).*\n)\s*?\n)(\s*(?: {4}|\t).*(?:\n|$))+/g,
|
||||
lookbehind: true,
|
||||
inside: {
|
||||
}
|
||||
};
|
||||
md.table = {
|
||||
pattern: new RegExp(
|
||||
[
|
||||
@ -49,7 +67,7 @@ Prism.languages.md = (function() {
|
||||
'gm'
|
||||
),
|
||||
inside: {
|
||||
lf: /\n/gm
|
||||
lf: lf
|
||||
}
|
||||
};
|
||||
md['table alt'] = {
|
||||
@ -70,27 +88,13 @@ Prism.languages.md = (function() {
|
||||
'gm'
|
||||
),
|
||||
inside: {
|
||||
lf: /\n/gm
|
||||
lf: lf
|
||||
}
|
||||
};
|
||||
|
||||
md.hr = {
|
||||
pattern: /^([*\-_] *){3,}$/gm
|
||||
};
|
||||
md.li = {
|
||||
pattern: /^[ \t]*([*+\-]|\d+\.)[ \t].+$/gm,
|
||||
inside: {
|
||||
"md md-li": /^[ \t]*([*+\-]|\d+\.)[ \t]/m
|
||||
}
|
||||
};
|
||||
for(var i = 6; i >= 1; i--) {
|
||||
md["h" + i] = {
|
||||
pattern: new RegExp("^#{" + i + "}.+$", "gm"),
|
||||
inside: {
|
||||
"md md-hash": new RegExp("^#{" + i + "} ")
|
||||
}
|
||||
};
|
||||
}
|
||||
md.blockquote = {
|
||||
pattern: /^ {0,3}> *[^\n]+$/gm,
|
||||
inside: {
|
||||
@ -103,7 +107,7 @@ Prism.languages.md = (function() {
|
||||
inside: {
|
||||
"md md-bracket-start": /^(\$\$|\\\\\[|\\\\\\\\\()/,
|
||||
"md md-bracket-end": /(\$\$|\\\\\]|\\\\\\\\\))/,
|
||||
lf: /\n/gm,
|
||||
lf: lf,
|
||||
rest: latex
|
||||
}
|
||||
};
|
||||
@ -111,7 +115,7 @@ Prism.languages.md = (function() {
|
||||
pattern: /\\?\\begin\{[a-z]*\*?\}[\s\S]*?\\?\\end\{[a-z]*\*?\}/g,
|
||||
inside: {
|
||||
"keyword": /\\?\\(begin|end)/,
|
||||
lf: /\n/gm,
|
||||
lf: lf,
|
||||
rest: latex
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user