Path: blob/main/src/resources/extensions/quarto/docusaurus/docusaurus_writer.lua
12923 views
-- docusaurus_writer.lua1-- Copyright (C) 2020-2023 Posit Software, PBC23-- function Writer(doc, opts)4-- doc = quarto._quarto.ast.walk(doc, {5-- CodeBlock = code_block,6-- })7-- assert(doc ~= nil)89-- -- insert react preamble if we have it10-- if #reactPreamble > 0 then11-- local preamble = table.concat(reactPreamble, "\n")12-- doc.blocks:insert(1, pandoc.RawBlock("markdown", preamble .. "\n"))13-- end1415-- local extensions = {16-- yaml_metadata_block = true,17-- pipe_tables = true,18-- footnotes = true,19-- tex_math_dollars = true,20-- header_attributes = true,21-- raw_html = true,22-- all_symbols_escapable = true,23-- backtick_code_blocks = true,24-- fenced_code_blocks = true,25-- space_in_atx_header = true,26-- intraword_underscores = true,27-- lists_without_preceding_blankline = true,28-- shortcut_reference_links = true,29-- }3031-- return pandoc.write(doc, {32-- format = 'markdown_strict',33-- extensions = extensions34-- }, opts)35-- end363738