Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/resources/extensions/quarto/docusaurus/docusaurus.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ end
-- into raw commamark to pass through via dangerouslySetInnerHTML
local function RawBlock(el)
if el.format == 'mdx' then
return pandoc.CodeBlock(el.text, pandoc.Attr("", {"mdx-code-block"}))
-- special mdx-code-block is not handled if whitespace is present after backtrick (#8333)
return pandoc.RawBlock("markdown", "````mdx-code-block\n" .. el.text .. "\n````")
elseif el.format == 'html' then
-- track the raw html vars (we'll insert them at the top later on as
-- mdx requires all exports be declared together)
Expand Down
2 changes: 1 addition & 1 deletion tests/docs/smoke-all/2023/04/27/5316.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ _quarto:
tests:
docusaurus-md:
ensureFileRegexMatches:
- ["[^\\]]``` *python", "[^\\]]``` *mdx-code-block"]
- ["[^\\]]``` *python", "[^\\]]````mdx-code-block"]
- ["[^\\]]``` *text"]
---

Expand Down