mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-04 05:44:50 +00:00
[PR #452] [MERGED] Bug/parsing math #1035
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/xoofx/markdig/pull/452
Author: @davidackroyd99
Created: 7/21/2020
Status: ✅ Merged
Merged: 7/22/2020
Merged by: @xoofx
Base:
master← Head:bug/parsing-math📝 Commits (2)
477a290typo: fixed comment in ApiController8758ba4fix: parsing math blocks with no leading or trailing whitespace📊 Changes
2 files changed (+3 additions, -5 deletions)
View changed files
📝
src/Markdig.WebApp/ApiController.cs(+1 -1)📝
src/Markdig/Extensions/Mathematics/MathInlineParser.cs(+2 -4)📄 Description
This fixes #451
Before my change the parser would look to see if the next character after the
or$ was a digit. It would then fail to match if it was a digit, which means that$x$would be a valid math block but$2x$would not be.I simply removed this check as
$2x$should be valid, but it still allows$ 2x $in order to be backwards compatible.I also changed the WebApi project comment that specified that the second parameter should be extensions, where as actually it should just be extension as per the controller method definition. This confused me when I was trying to replicate the bug.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.