[PR #311] [MERGED] Add Bracketing around Math Expressions for improved MathLib Rendering #934

Open
opened 2026-01-29 14:47:29 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/xoofx/markdig/pull/311
Author: @RickStrahl
Created: 2/22/2019
Status: Merged
Merged: 2/25/2019
Merged by: @xoofx

Base: masterHead: MathExtension_Bracketing


📝 Commits (3)

  • 987580e Add inline block and block display bracketing tags around rendered mathematics content so it can render
  • 9965597 Fix tests to match bracketing.
  • 8eb52c5 Update Math Specs and ensure tests pass.

📊 Changes

5 files changed (+309 additions, -235 deletions)

View changed files

📝 src/Markdig.Tests/Specs/MathSpecs.cs (+30 -28)
📝 src/Markdig.Tests/Specs/MathSpecs.md (+16 -14)
📝 src/Markdig.Tests/TestParser.cs (+258 -190)
📝 src/Markdig/Extensions/Mathematics/HtmlMathBlockRenderer.cs (+3 -1)
📝 src/Markdig/Extensions/Mathematics/HtmlMathInlineRenderer.cs (+2 -2)

📄 Description

Added bracketing to math expressions for better rendering support without fixups in various math libraries.

  • bracket \( and \) for inline expressions
  • bracket \[ and \] for block expressions

References Issue #307

For reference with other parsers (primarily PanDoc):

BabelMark Specs


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/xoofx/markdig/pull/311 **Author:** [@RickStrahl](https://github.com/RickStrahl) **Created:** 2/22/2019 **Status:** ✅ Merged **Merged:** 2/25/2019 **Merged by:** [@xoofx](https://github.com/xoofx) **Base:** `master` ← **Head:** `MathExtension_Bracketing` --- ### 📝 Commits (3) - [`987580e`](https://github.com/xoofx/markdig/commit/987580e71ebbfa474bb490b3a984b1ee906f0e7d) Add inline block and block display bracketing tags around rendered mathematics content so it can render - [`9965597`](https://github.com/xoofx/markdig/commit/99655972561271af39834699759a9717d39d1717) Fix tests to match bracketing. - [`8eb52c5`](https://github.com/xoofx/markdig/commit/8eb52c50ecfc9c8e4497227ded96675f50ac526d) Update Math Specs and ensure tests pass. ### 📊 Changes **5 files changed** (+309 additions, -235 deletions) <details> <summary>View changed files</summary> 📝 `src/Markdig.Tests/Specs/MathSpecs.cs` (+30 -28) 📝 `src/Markdig.Tests/Specs/MathSpecs.md` (+16 -14) 📝 `src/Markdig.Tests/TestParser.cs` (+258 -190) 📝 `src/Markdig/Extensions/Mathematics/HtmlMathBlockRenderer.cs` (+3 -1) 📝 `src/Markdig/Extensions/Mathematics/HtmlMathInlineRenderer.cs` (+2 -2) </details> ### 📄 Description Added bracketing to math expressions for better rendering support without fixups in various math libraries. - bracket `\(` and `\)` for inline expressions - bracket `\[` and `\]` for block expressions References Issue #307 For reference with other parsers (primarily PanDoc): [BabelMark Specs](https://johnmacfarlane.net/babelmark2/?text=Math+expressions%0A%0A%24%5Cfrac%7Bn!%7D%7Bk!(n-k)!%7D+%3D+%5Cbinom%7Bn%7D%7Bk%7D%24%0A%0A%24%24%5Cfrac%7Bn!%7D%7Bk!(n-k)!%7D+%3D+%5Cbinom%7Bn%7D%7Bk%7D%24%24%0A%0A%24%24%0A%5Cfrac%7Bn!%7D%7Bk!(n-k)!%7D+%3D+%5Cbinom%7Bn%7D%7Bk%7D%0A%24%24%0A) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 14:47:29 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#934