Skip to content

Highlight Makefile fenced code blocks in Markdown - #3921

Open
Matei02355 wants to merge 2 commits into
sharkdp:masterfrom
Matei02355:fix-markdown-makefile-fences-2032-20260907
Open

Matei02355 wants to merge 2 commits into
sharkdp:masterfrom
Matei02355:fix-markdown-makefile-fences-2032-20260907

Conversation

@Matei02355

@Matei02355 Matei02355 commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Markdown recognizes a Makefile fence's label but treats its contents as plain code because there is no Makefile embedding rule.

Embed source.makefile for case-insensitive makefile, make, and mk labels, using the existing fence delimiter and escape rules. Add coverage for backtick and tilde fences, variables, recipes, aliases, and Markdown following the closing fence.

Fixes #2032.

Validation: Applied the complete Markdown patch to the pinned syntax and rebuilt a custom syntax cache. Confirmed Makefile tokens receive highlighting and the closing fence restores Markdown. Both existing Markdown fixtures remain byte-for-byte unchanged. Full asset-rebuild CI is queued; generated binary assets are not committed.

This branch has not been deployed

No deployments
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.

bat does not colorize makefile code block inside markdown

1 participant