Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
logger.error(error)
detectErrors = true
pageTitle = 'Cannot connect to validator'
pageHeader = 'Unable to connect to HTML validator'
}
if (detectErrors) {
markup = body
// Highlight and add line numbers to html
formattedHTML = '<pre class="\'markup\'">\n<code class="language-html">\n'
markupArray = markup.split('\n')
for (i = 0; i < markupArray.length; i++) {
markupLine = markupArray[i]
if (errorMap.has(i + 1)) {
formattedHTML += `<span class="line-numbers error" title="${errorMap.get(i + 1)}">`
formattedHTML += Prism.highlight(`${markupLine}`, Prism.languages.markup)
formattedHTML += '</span>'
} else {
formattedHTML += '<span class="\'line-numbers\'">'
formattedHTML += Prism.highlight(`${markupLine}`, Prism.languages.markup)
formattedHTML += '</span>'
}
}
formattedHTML += '</code>\n</pre>'
// build markup template
formattedHTML = `<h2>Markup used:</h2>\n${formattedHTML}`
res.status(500)
model.prismStyle = prismStyleSheet.toString()
model.pageTitle = pageTitle
model.preWidth = markupArray.length.toString().length * 8
model.pageHeader = pageHeader
}
`;
this.codeConfigHtml = $sce.trustAsHtml(Prism.highlight(codeConfig, Prism.languages.javascript));
const codeConfigSame = `
{
viewFormat: 'YYYY-MM-DD HH:mm:ss',
modelFormat: 'YYYY-MM-DD HH:mm:ss'
}
`;
this.codeConfigHtmlSame = $sce.trustAsHtml(Prism.highlight(codeConfigSame, Prism.languages.javascript));
const codePart1 = `
`;
this.part1Html = $sce.trustAsHtml(Prism.highlight(codePart1, Prism.languages.html));
const codePart2 = `
`;
this.part2Html = $sce.trustAsHtml(Prism.highlight(codePart2, Prism.languages.html));
}
}
require('prismjs/components/prism-livescript');
require('prismjs/components/prism-latex');
require('prismjs/components/prism-groovy');
require('prismjs/components/prism-graphql');
require('prismjs/components/prism-nginx');
require('prismjs/components/prism-erlang');
require('prismjs/components/prism-powershell');
require('prismjs/components/prism-makefile');
require('prismjs/components/prism-markdown');
//alias
Prism.languages.js = Prism.languages.javascript;
Prism.languages['c#'] = Prism.languages.csharp;
Prism.languages['f#'] = Prism.languages.fsharp;
Prism.languages.sh = Prism.languages.bash;
Prism.languages.md = Prism.languages.markdown;
Prism.languages.py = Prism.languages.python;
Prism.languages.yml = Prism.languages.yaml;
Prism.languages.rb = Prism.languages.ruby;
var Parser = function Parser(options) {
options = options || {};
this.options = options;
};
Parser.highlights = {};
Parser.marked = marked;
Parser.Prism = Prism;
//使标题解析 # 号可以无空格
marked.Lexer.rules.gfm.heading = marked.Lexer.rules.heading;
marked.Lexer.rules.tables.heading = marked.Lexer.rules.heading;
import Prism from 'prismjs';
export default Prism.languages.q;
require('prismjs/components/prism-cpp');
require('prismjs/components/prism-lua');
require('prismjs/components/prism-livescript');
require('prismjs/components/prism-latex');
require('prismjs/components/prism-groovy');
require('prismjs/components/prism-graphql');
require('prismjs/components/prism-nginx');
require('prismjs/components/prism-erlang');
require('prismjs/components/prism-powershell');
require('prismjs/components/prism-makefile');
require('prismjs/components/prism-markdown');
//alias
Prism.languages.js = Prism.languages.javascript;
Prism.languages['c#'] = Prism.languages.csharp;
Prism.languages['f#'] = Prism.languages.fsharp;
Prism.languages.sh = Prism.languages.bash;
Prism.languages.md = Prism.languages.markdown;
Prism.languages.py = Prism.languages.python;
Prism.languages.yml = Prism.languages.yaml;
Prism.languages.rb = Prism.languages.ruby;
const Parser = function (options) {
options = options || {};
this.options = options;
};
Parser.highlights = {};
Parser.marked = marked;
Parser.Prism = Prism;
//使标题解析 # 号可以无空格
import Prism from 'prismjs';
export default Prism.languages.markup;
import Prism from 'prismjs';
export default Prism.languages.properties;
if (title) {
return {
type: 'html',
value: `
`
};
}
if (prism.languages[lang]) {
const highlighted = prism.highlight(strippedValue, prism.languages[lang], lang);
const langClass = `language-${lang}`;
return {
type: 'html',
value: `<pre class="sg-pre ${langClass}"><code class="sg-code ${langClass}">${highlighted}</code></pre>`
};
}
};
import Prism from 'prismjs';
export default Prism.languages.r;
require('prismjs/components/prism-latex');
require('prismjs/components/prism-groovy');
require('prismjs/components/prism-graphql');
require('prismjs/components/prism-nginx');
require('prismjs/components/prism-erlang');
require('prismjs/components/prism-powershell');
require('prismjs/components/prism-makefile');
require('prismjs/components/prism-markdown');
//alias
Prism.languages.js = Prism.languages.javascript;
Prism.languages['c#'] = Prism.languages.csharp;
Prism.languages['f#'] = Prism.languages.fsharp;
Prism.languages.sh = Prism.languages.bash;
Prism.languages.md = Prism.languages.markdown;
Prism.languages.py = Prism.languages.python;
Prism.languages.yml = Prism.languages.yaml;
Prism.languages.rb = Prism.languages.ruby;
var Parser = function Parser(options) {
options = options || {};
this.options = options;
};
Parser.highlights = {};
Parser.marked = marked;
Parser.Prism = Prism;
//使标题解析 # 号可以无空格
marked.Lexer.rules.gfm.heading = marked.Lexer.rules.heading;
marked.Lexer.rules.tables.heading = marked.Lexer.rules.heading;