-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
Support for configurable start and finish token #103
Comments
Hi there! Cool!
If you are migrating, why not change the markup in the source documents? As you note: you are aware of previous discussions. So here I’d ask the same questions. As for regexes and arbitrary start/end stuff: markdown is rather complex in how it all works together. You may have heard before how regexes can’t be used to parse HTML. The same is true for markdown. I’m quite wary of trying to do that here too.
Without arguments, I am personally not interested in allowing every random government or other organization to come up with their own custom flavors of markdown (easily*, there are always extensions that folks can make and maintain themselves). I believe that to be bad for markdown. |
Hey @wooorm, To answer your questions:
Unfortunately we are but a small cog in a much larger system of legacy processes and procedures, and not only looking at supporting an existing ~112k documents, but regularly updated/newly created documents too. For us, (noting -
Yes actually, we have a regex pipeline that >1 min due to lookaheads.
Good catch regarding govy - We're understanding that overall; this type of request independently does not align with goals of Remark/Unified. However, believe that this would achieve middle ground between maintaining consistency/opinionated syntax but allow for users to take an unopinionated/differentiated approach.
We have an existing (combined) 7 remark & rehybe extensions which we've written for this project, but when investigating this, found that other users were requesting out-of-scope formatting. And believe that as a result of allowing customization of start/finish tokens would benefit a vocal minority of the community. Regardless of outcome - awesome work from yourself & team, and as mentioned above, we understand that this doesn't necessarily align with the direction of the project and worst comes to worst, we'll look at implementing this internally. |
Appreciate the kind words and understanding! I am sorry. I understand that you want this and it would be nice for you. But I don’t want to spend the forseeable future of my life, unpaid, maintaining this code. It’s not my idea of fun to deal with the bugs. And I don’t think it’s good for the world to split markdown in more flavors. I am already way too pressed for time and money. The problem you have will grow and grow. There will be more and more documents. More and more questions. Or, to maintain a fork. |
Initial checklist
Problem
We're in the process of migrating an existing internal, proprietary, "markdown-esque" formatting system to a unified & remark based system. As part of this,
$
and$$
are already in use. I'm aware that the discussion over at #39 came to the conclusion that the inclusion of other opinionated formats wouldn't be included (n.b. we also cannot use the bracketed format discussed in that thread). But perhaps a configurable regex or start & finish tokens exposed via options would be a good middle ground.This would mean that by default remark-math would continue to use
$
and$$
but allow for the (deliberate) choice to stray away from standards.Solution
Modify
mdast-util-math
options to accept an experimental/unsupported start & finish token or regex expression.Alternatives
Alternative solutions
The text was updated successfully, but these errors were encountered: