Skip to content

Commit 2cadb5b

Browse files
committed
Fixed trimming of non-highlighted syntax
1 parent 02f4a39 commit 2cadb5b

File tree

1 file changed

+2
-5
lines changed
  • projects/iqui-ngx/src/lib/components/code/highlight-js

1 file changed

+2
-5
lines changed

projects/iqui-ngx/src/lib/components/code/highlight-js/index.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -362,15 +362,12 @@ export class HighlightJsComponent implements OnInit, OnDestroy, OnChanges, After
362362
this._rawSyntax = syntax;
363363

364364
// HighlightSyntax
365+
highlightedSyntax = syntax;
365366
try {
366367
if (this.highlight) {
367368
highlightedSyntax = !this.disabled ? hljs.highlightAuto(syntax, this.languages).value : syntax;
368369
}
369-
} catch (err) {
370-
// tslint:disable-next-line: no-unused-expression
371-
err;
372-
return;
373-
}
370+
} catch (err) {}
374371

375372
// Add line numbers
376373
const rawSyntaxLines = syntax.split('\n'),

0 commit comments

Comments
 (0)