Skip to content

Commit a6a5d08

Browse files
committed
fix(markdown-to-html): use regex to match new API
1 parent d952a22 commit a6a5d08

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export class DocsMarkdownRenderer extends Renderer {
6464
* {
6565
* "example": "exampleName",
6666
* "file": "example-html.html",
67-
* "region": "some-region",
67+
* "region": "some-region"
6868
* }
6969
* ) -->`
7070
* turns into
@@ -79,7 +79,7 @@ export class DocsMarkdownRenderer extends Renderer {
7979
*/
8080
html(html: string) {
8181
html = html.replace(exampleCommentRegex, (_match: string, content: string) => {
82-
if (content.startsWith('{')) {
82+
if (content.match(/\{[\s\S]*\}/g)) {
8383
const {example, file, region} = JSON.parse(content);
8484
return `<div material-docs-example="${example}"
8585
file="${file}"

0 commit comments

Comments
 (0)