Repository navigation
Docu (hotfix-stable): cleanUpMarkdown.sh turned closing code fences into opening ones - #371
Open
tombouctou wants to merge 1 commit into
Open
tombouctou wants to merge 1 commit into
tombouctou wants to merge 1 commit into
Conversation
…ning ones
The rule that labels code cells as Mathematica,
sed -z 's|\n\n```\n|\n\n```mathematica\n|g'
also matched a closing fence that follows an empty line (a cell ending in
a blank line), so the cell was closed by "```mathematica" - which opens a
new block instead. pandoc then renders the cell as a paragraph of raw text
("```mathematica FCCompareResults[...]") or swallows the output after it
into the code block (TID, UnDeclareNonCommutative).
The rule is replaced by an awk pass that tracks whether it is inside a cell
and labels only opening fences (still only after an empty line, as before),
and the 54 Markdown files of hotfix-stable already affected get their
closing fence back. Same change as on master.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documentation/Scripts/cleanUpMarkdown.shlabels code cells as Mathematica withThe pattern is meant for opening fences, but it also matches a closing fence that follows an empty line, i.e. a cell whose last line is blank. Such a cell is then "closed" by ````mathematica`, which opens a new block instead. pandoc renders the cell as a paragraph of raw text (see the bottom of QED/TwoLoops/Renormalization-LeAle: "```mathematica FCCompareResults[leptonSE$RenConstants2L, …"), or, in TID and UnDeclareNonCommutative, pulls the output that follows into the code block.
Changes
cleanUpMarkdown.sh: thesed -zrule is replaced by an awk pass that tracks whether it is inside a cell and labels only opening fences. As before, it does so only for a bare ````` after an empty line. Closing fences are left alone.hotfix-stablealready affected get their closing fence back: inside a cell, a ````mathematica` line becomes `````. Nothing else in them changes; each file has a one-line diff.Verification
generateHTML.sh's pandoc command (template + md2html.lua) gives a proper code block where the website currently shows raw text.Same change as #370 (master), on
hotfix-stable: its Markdown differs from master in places, so the repair was rerun on this branch instead of cherry-picking (a cherry-pick conflicts). The stable manual on the website (FeynCalcBook) is built from this branch.The website side, where the already generated HTML of 76 pages is fixed, is FeynCalc/feyncalc.github.io#28.
🤖 Generated with Claude Code