@parcel/codeframe
Advanced tools
Comparing version 2.0.0-canary.1776 to 2.0.0-canary.1777
{ | ||
"name": "@parcel/codeframe", | ||
"version": "2.0.0-canary.1776+53633df12", | ||
"version": "2.0.0-canary.1777+2e67b94b7", | ||
"description": "Blazing fast, zero configuration web application bundler", | ||
@@ -37,3 +37,3 @@ "license": "MIT", | ||
}, | ||
"gitHead": "53633df12ad9bba5d6ed5360e935fde8de0342fe" | ||
"gitHead": "2e67b94b7ea7fda6069793cad506e4375d9ac8b3" | ||
} |
@@ -132,7 +132,15 @@ // @flow | ||
let lines = code.split(NEWLINE); | ||
let syntaxHighlightedLines = ( | ||
opts.syntaxHighlighting ? highlightSyntax(code, opts.language) : code | ||
) | ||
.replace(TAB_REPLACE_REGEX, TAB_REPLACEMENT) | ||
.split(NEWLINE); | ||
let visibleLines = lines | ||
.slice(startLine, endLineIndex + 1) | ||
.map(l => l.replace(TAB_REPLACE_REGEX, TAB_REPLACEMENT)); | ||
if (opts.syntaxHighlighting) { | ||
visibleLines = highlightSyntax( | ||
visibleLines.join('\n'), | ||
opts.language, | ||
).split(NEWLINE); | ||
} | ||
let syntaxHighlightedLines = lines | ||
.slice(0, startLine) | ||
.concat(visibleLines) | ||
.concat(lines.slice(endLineIndex + 2)); | ||
@@ -139,0 +147,0 @@ // Loop over all lines and create codeframe |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
3512268
38573