diff --git a/src/languages/typescript.js b/src/languages/typescript.js index 23d3fb34a4..729fba6a84 100644 --- a/src/languages/typescript.js +++ b/src/languages/typescript.js @@ -159,7 +159,6 @@ export default function(hljs) { excludeBegin: true, excludeEnd: true, keywords: KEYWORDS, contains: [ - 'self', hljs.C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE ] diff --git a/test/markup/typescript/comment-after-enclosed-lambda.expect.txt b/test/markup/typescript/comment-after-enclosed-lambda.expect.txt new file mode 100644 index 0000000000..a0a6285be1 --- /dev/null +++ b/test/markup/typescript/comment-after-enclosed-lambda.expect.txt @@ -0,0 +1,2 @@ +const bad = ((a, b) => [...a, b]); +// https://github.com/highlightjs/highlight.js/issues/2189 diff --git a/test/markup/typescript/comment-after-enclosed-lambda.txt b/test/markup/typescript/comment-after-enclosed-lambda.txt new file mode 100644 index 0000000000..8747ec80cc --- /dev/null +++ b/test/markup/typescript/comment-after-enclosed-lambda.txt @@ -0,0 +1,2 @@ +const bad = ((a, b) => [...a, b]); +// https://github.com/highlightjs/highlight.js/issues/2189