-
Notifications
You must be signed in to change notification settings - Fork 76
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
Feature request: ignore spaces before a list bullet (was: does not parse bullets very well) #14
Comments
Hi @sdupuis1 I don't fully understand your problem from your description. Could you share an example of the markdown you are trying to parse and what you expect the result to be. |
Draw a large face of a clock and place in the numbers \n\n + position the hands for 5 minutes after 11 o'clock \n\n + On your clock, label "L" for the long hand and "S" for the short hand |
The below markdown works(note the difference): |
I see the '+' has to be the first char on the line for a list to work. Is this a problem for you? This is usually how you define a list. If you have a suggestion on an improvement on the regex I am happy to merge it. Unfortunately I don't have time to look into this problem right now. |
Add it to your list :) The reason you would want this is if the markdown had a list, then sublist. This is typically done with some space indentation. Thx for at least looking :) I think I may fork you project and add some things. |
Note that 4 spaces before a '+' sign could be interpreted as a code block in some popular Markdown implementations. So implementing this feature should not allow for an arbitrary number of spaces. |
Sublists with spaces (like here on github) are something contextual and might be tricky to parse using regex. See https://en.wikipedia.org/wiki/Chomsky_hierarchy. But then, some NSRegularExpressionAnchorsMatchLines together with look-ahead syntax might help to achieve it. But I'm concerned with the ambiguity of sublist and code block. I would prefer a multi-sign syntax (like mediaWiki) to a multi-space syntax (like commonmark). Multi-sign-style: This would also be coherent with header multi-sign syntax. |
Seems to have issues with spacing
Ex. does not work:
Draw a large face of a clock and place in the numbers \n\n + position the hands for 5 minutes after 11 o'clock \n\n + On your clock, label "L" for the long hand and "S" for the short hand
removing the spaces before the + makes it work. P.S. this should be some text followed by 2 bullet points.
Also had issues when using a * for bullet points.dot have an example handy but it seems to confuse it with emphasis which is also a *
The text was updated successfully, but these errors were encountered: