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

Terminating emphasis #50

Open
istathar opened this issue Jun 1, 2018 · 3 comments
Open

Terminating emphasis #50

istathar opened this issue Jun 1, 2018 · 3 comments

Comments

@istathar
Copy link

istathar commented Jun 1, 2018

I've run into a few corner cases and I'm trying to understand if I could hack your spec to make them supported. The one that really jumped out at me was that emphasis couldn't be terminated mid word. Is there any way to make this fragment supported? Example:

So in this case just plonking it into _/var/lib/pgsql_ ought to work?
Otherwise pick somewhere \[tempting but not _/tmp_\] to put it.
                                                 ^

was rejected by your mmark CLI tool. (fragment is from a conversation on Gitter which did indeed render according to my intent). In this case, the markup significant punctuation character ], as escaped, shouldn't have been part of the word, and so the emphasis span should have been valid?

I understand and support your idea of a strictly validating Markdown subset. Just trying to see if I can get to the point where I can live with it :)

AfC

@mrkkrp
Copy link
Member

mrkkrp commented Jun 1, 2018

as escaped, shouldn't have been part of the word, and so the emphasis span should have been valid

Please see here: https://github.com/mmark-md/mmark#mmark-and-common-mark. Character after _ should have lower "level", but when something is escaped it becomes other character with level 2.

I agree, I couldn't figure out a good story for this (yet?). The present version is already much better than what we had before, it allows most combinations. In fact, I processed by entire blog with this, including all tutorials and stuff without issues.

@istathar
Copy link
Author

istathar commented Jun 4, 2018

Read it again now more closely. Ok: why does escaping a punctuation character level 1 (actually, markup character, which is why it needed escaping in the first place) escalate it to other character level 2? I would have expected escaping the markdown significant character to simply mean it wasn't treated as significant, returning it to punctuation.

(ah, if only it were easy to use U+200B ZERO WIDTH SPACE in text files)

AfC

@mrkkrp
Copy link
Member

mrkkrp commented Jun 4, 2018

I would have expected escaping the markdown significant character to simply mean it wasn't treated as significant, returning it to punctuation.

Then other cases would become problematic, e.g.

Here goes *(something\)*.

The truth is that in both cases there will be awkward situations. We need something more clever here. Unfortunately, I have little time to spend on MMark these days. And whatever time I have I'll be spending working on Megaparsec 7.

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

No branches or pull requests

2 participants