Repository navigation
Fix code cells shown as raw "```mathematica" text (76 pages) - #28
Open
tombouctou wants to merge 1 commit into
Open
tombouctou wants to merge 1 commit into
tombouctou wants to merge 1 commit into
Conversation
In the Markdown the manuals and the example gallery are generated from,
a code cell that ends with an empty line has its closing fence turned into
"```mathematica" by Documentation/Scripts/cleanUpMarkdown.sh: the rule
sed -z 's|\n\n```\n|\n\n```mathematica\n|g'
is meant to label opening fences, but a closing fence preceded by a blank
line matches it too. The fence then opens instead of closing, and pandoc
renders the cell as a paragraph of raw text ("```mathematica
FCCompareResults[...] ...") or swallows the output that follows into the
code block (TID, UnDeclareNonCommutative).
Affected: 52 example pages (e.g. QED/TwoLoops/Renormalization-LeAle, at
the bottom), 11 pages of the stable manual, 13 of the development manual.
Each page was regenerated with the generateHTML.sh pandoc command from
its Markdown source with the relabelled closing fence put back to "```"
(master for FeynCalcBookDev and the examples, hotfix-stable for
FeynCalcBook, the last version before removal for ten examples whose
source is gone from master). Only the broken region was taken over from
the result; the rest of each page is unchanged byte for byte.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 19, 2026
This branch has not been deployed
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.
At the bottom of e.g. QED/TwoLoops/Renormalization-LeAle the last code cell is shown as a paragraph of raw text:
```mathematica FCCompareResults[leptonSE$RenConstants2L, knownResult, Text -> {“to Grozing, …followed by a stray```mathematica.Cause
FeynCalc/Documentation/Scripts/cleanUpMarkdown.shlabels code cells withwhich is meant for opening fences, but a closing fence that follows an empty line (a cell ending in a blank line) matches too. The cell is then "closed" by
```mathematica, which opens a new block instead, and pandoc renders the cell as a paragraph of raw text — or, in TID and UnDeclareNonCommutative, swallows the output after it into the code block.What this PR changes
76 pages: 52 in
FeynCalcExamples, 11 inFeynCalcBook, 13 inFeynCalcBookDev(FeynHelpersBookDev is not affected). No other page contains a stray fence afterwards.Each page was regenerated with the pandoc command of
generateHTML.sh(same template and Lua filter) from its Markdown source with the relabelled closing fence put back to```—masterfor FeynCalcBookDev and the examples,hotfix-stablefor FeynCalcBook, and for ten examples no longer inmaster(e.g.QED/OneLoop/El-El,QCD/OneLoop/Q-Q; not linked from the gallery any more) the last version before they were removed. Only the broken region was taken over from the result; everything else in each page is unchanged byte for byte, so differences between pandoc versions and later edits of the sources do not leak in. Checked: no```left in any page,<div>s balanced, no duplicate code-block ids.The source
The script fix and the affected Markdown files (56 on master, 54 on hotfix-stable) are in FeynCalc/feyncalc#370 (master) and FeynCalc/feyncalc#371 (hotfix-stable) — the
sedrule is replaced by an awk pass that labels only opening fences. Without it the next regeneration of the manuals brings the broken cells back.Kept separate from the search PR so that it can be reviewed on its own.
🤖 Generated with Claude Code