Skip to content

Commit

Permalink
build(docs-infra): never show linenums for triple-backticked code blo…
Browse files Browse the repository at this point in the history
…cks (#31493)

PR Close #31493
  • Loading branch information
petebacondarwin authored and matsko committed Jul 16, 2019
1 parent 9ac9c84 commit 177cf26
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
module.exports = function code(h, node) {
var value = node.value ? ('\n' + node.value + '\n') : '';
var lang = node.lang && node.lang.match(/^[^ \t]+(?=[ \t]|$)/);
var props = {};
var props = {
linenums: 'false'
};

if (lang) {
props.language = lang;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ describe('remark: renderMarkdown service', () => {
'```';
const output = renderMarkdown(content);
expect(output).toEqual(
'<code-example language="ts">\n' +
'<code-example linenums="false" language="ts">\n' +
' class MyClass {\n' +
' method1() { ... }\n' +
' }\n' +
Expand Down

0 comments on commit 177cf26

Please sign in to comment.