Skip to content

Commit

Permalink
feat: ✨ add JS fenced code blocks and suppress errors
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Jan 15, 2025
1 parent 37e6f6d commit f77d9dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/sample/genaisrc/envoutput.genai.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ output.heading(3, "hello world")

$`Write a poem`

output.fence(`let x = "abc"`, "js")
output.itemValue("item", "value")
output.fence("This is a fence")
output.fence(
Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/Mermaid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function MermaidInternal(props: { value: string }) {
useEffect(() => {
if (ref.current) {
mermaid.initialize({ theme })
mermaid.run({ nodes: [ref.current] })
mermaid.run({ nodes: [ref.current], suppressErrors: true })
}
}, [value, theme])
if (!value) return null
Expand Down

0 comments on commit f77d9dc

Please sign in to comment.