Skip to content

Commit b23f5fd

Browse files
committed
fix test to reflect change
1 parent 8cc4634 commit b23f5fd

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

tools/markdown-to-html/docs-marked-renderer.spec.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,9 @@ describe('DocsMarkdownRenderer', () => {
4949
{
5050
"example": "exampleName",
5151
"file": "example-html.html",
52-
"region": "some-region",
52+
"region": "some-region"
5353
}
5454
) -->`);
55-
56-
// TODO(annieyw): I think DocsMarkedRenderer#html needs to be fixed for the new API?
5755
expectEqualIgnoreLeadingWhitespace(result, `<div material-docs-example="
5856
{
5957
"example": "exampleName",

tools/markdown-to-html/docs-marked-renderer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ export class DocsMarkdownRenderer extends Renderer {
7979
*/
8080
html(html: string) {
8181
html = html.replace(exampleCommentRegex, (_match: string, content: string) => {
82+
// using [\s\S]* because .* does not match line breaks
8283
if (content.match(/\{[\s\S]*\}/g)) {
83-
// using [\s\S]* because .* does not match line breaks
8484
const {example, file, region} = JSON.parse(content);
8585
return `<div material-docs-example="${example}"
8686
file="${file}"

0 commit comments

Comments
 (0)