diff --git a/lib/node_modules/@stdlib/_tools/remark/plugins/remark-namespace-toc/lib/transformer.js b/lib/node_modules/@stdlib/_tools/remark/plugins/remark-namespace-toc/lib/transformer.js index 97be45b81c17..f262a951fde9 100644 --- a/lib/node_modules/@stdlib/_tools/remark/plugins/remark-namespace-toc/lib/transformer.js +++ b/lib/node_modules/@stdlib/_tools/remark/plugins/remark-namespace-toc/lib/transformer.js @@ -25,6 +25,7 @@ var visit = require( 'unist-util-visit' ); var createTOC = require( '@stdlib/_tools/markdown/namespace-toc' ); var startsWith = require( '@stdlib/string/starts-with' ); var endsWith = require( '@stdlib/string/ends-with' ); +var format = require( '@stdlib/string/format' ); // VARIABLES // @@ -171,7 +172,7 @@ function transformer( tree, file ) { } } if ( i === parent.children.length - 1 ) { - throw new Error( 'invalid node. Invalid table of contents (toc) comment. Ensure that the Markdown file includes both starting and ending `toc` comments. Node: `' + node.value + '`.' ); + throw new Error( format( 'invalid node. Invalid table of contents (toc) comment. Ensure that the Markdown file includes both starting and ending `toc` comments. Node: `%s`.', node.value ) ); } if ( found ) { debug( 'Append links to links section...' );