-
-
Notifications
You must be signed in to change notification settings - Fork 145
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
Too eager parsing of italic markup #668
Comments
I think that's a known bug and applies for all kind of markup. I think I remember that, once I worked on the regex parser, I decided that it's too hard to fix and postponed it to the future clojure parser :) But maybe a fresh look on the regex parser allows you to fix it. |
I don’t think it’s a duplicate. The other issues are about the parser choking on lines containing multiple inline markup statements. This issue is much more simple: |
Yep, the issues linked above are only related. It's probably the same regex. Anyway, the problem applies to all kind of markup, e.g. |
You are correct, it does apply to all kind of inline markup. I've written a test and looked at the Regexp. But I don't understand why it doesn't work as written at the moment(; |
I did not look at the proper Org syntax, but what if we just required a whitespace before inline markup? Thus, replace |
@lechten Your proposal fixes some terms like |
Partial update: The |
The |
hihi, we're looking at the same options currently. I'm checking if there's a way for a match group to basically be ignored. But that's probably against the whole idea of match groups. |
There is a way! |
Looked promising and passes all tests, but it breaks |
|
I think Welcome to regexp based parsing hell(; |
As suggested in issue 200ok-ch#668, markup should only be used at "word" boundaries. Thus, make the previous prefix non-optional and add "^". Also, in response to the examples given in PR 200ok-ch#910, allow to mark up single characters.
I hope that PR #910 fixes this now (one more commit not mentioning this, sorry). |
Is shown as:
The text was updated successfully, but these errors were encountered: