Skip to content

Fix sandcastle golden test failures by enabling markdown fenced-code-attributes extension - #133

Merged
John Demme (teqdruid) merged 3 commits into
mainfrom
copilot/fix-build-linux-error
Aug 21, 2026
Merged

John Demme (teqdruid) merged 3 commits into
mainfrom
copilot/fix-build-linux-error

Conversation

Copilot AI commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

The build-linux CI job was failing: sandcastle's internal golden markdown tests (examples, decls) no longer matched their golden files because generated fenced code blocks lost their kanagawa language annotation.

Root cause

  • styleCodeBlocks (tools/sandcastle/lib/Sandcastle/DocGen.hs) correctly tags code blocks with the kanagawa class in the Pandoc AST.
  • The markdown writer (writePandoc in tools/sandcastle/lib/Sandcastle.hs) enabled Ext_backtick_code_blocks but not Ext_fenced_code_attributes — the extension pandoc requires to actually emit fence info-string attributes (class/language) on output. Without it, the class is silently dropped during rendering even though it's present in the AST.

Fix

  • Enable Ext_fenced_code_attributes alongside the other writer extensions in writePandoc:
exts = strictExtensions -- Necessary for raw html
         & enableExtension Ext_tex_math_dollars
         & enableExtension Ext_pipe_tables
         & enableExtension Ext_markdown_in_html_blocks
         & enableExtension Ext_backtick_code_blocks
         & enableExtension Ext_fenced_code_attributes

Repo hygiene

  • Added dist-newstyle to tools/sandcastle/.gitignore and removed build artifacts that were accidentally committed while reproducing the failure locally.

Copilot AI and others added 2 commits August 20, 2026 21:56
Co-authored-by: teqdruid <1498080+teqdruid@users.noreply.github.com>
Co-authored-by: teqdruid <1498080+teqdruid@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job build-linux / build Fix sandcastle golden test failures by enabling markdown fenced-code-attributes extension Aug 20, 2026
@teqdruid
John Demme (teqdruid) marked this pull request as ready for review August 20, 2026 23:59
@teqdruid
John Demme (teqdruid) merged commit 287de13 into main Aug 21, 2026
24 checks passed
@teqdruid
John Demme (teqdruid) deleted the copilot/fix-build-linux-error branch August 21, 2026 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants