Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delimiter runs with punctuation on both sides are rejected #113

Open
Gabriella439 opened this issue Jul 1, 2024 · 1 comment
Open

Delimiter runs with punctuation on both sides are rejected #113

Gabriella439 opened this issue Jul 1, 2024 · 1 comment
Labels

Comments

@Gabriella439
Copy link

The minimal reproduction is that the string *.*. fails to parse:

ghci> MMark.parse "" "*.*."
Left (ParseErrorBundle {bundleErrors = FancyError 2 (fromList [ErrorCustom (NonFlankingDelimiterRun ('*' :| ""))]) :| [], bundlePosState = PosState {pstateInput = "*.*.", pstateOffset = 0, pstateSourcePos = SourcePos {sourceName = "", sourceLine = Pos 1, sourceColumn = Pos 1}, pstateTabWidth = Pos 4, pstateLinePrefix = ""}})

A non-minimal reproduction that conveys the actual problem I'm grappling with is that the following markdown fails to parse:

1. **API (Application Programming Interface)**: A set of protocols and tools for building and interacting with software applications.
2. **CI/CD (Continuous Integration/Continuous Deployment)**: Practices that enable developers to frequently integrate code into a shared repository and deploy updates swiftly and safely.
3. **OAuth (Open Authorization)**: An open standard for token-based authentication and authorization on the internet.
4. **UX (User Experience)**: The overall experience a person has when interacting with a product, particularly in terms of how easy and enjoyable it is to use.

The problem is that for each bolded "heading" the end of the heading is )**: which is a delimiter run with punctuation on both sides, which the mmark package rejects.

I wasn't sure if this rejection was intentional (because I know this package tries to reject some things intentionally to avoid common errors) so I wasn't sure whether to report this as a bug I wanted to ask about it just in case.

@mrkkrp mrkkrp added the question label Jul 8, 2024
@mrkkrp
Copy link
Member

mrkkrp commented Jul 8, 2024

Similar to #114 the solution is the same—simply escape the closing parenthesis with a backslash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants