-
Notifications
You must be signed in to change notification settings - Fork 333
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
[Attributed Strings] Can the Styler
know which list item marker was parsed?
#176
Comments
Hi @cpvbruno , unfortunately it isn't possible to differentiate between list items like the way you need to. The reason being is that If I may ask, what are you trying to achieve? Perhaps I can help you further. |
Styler
without having to implement everything again?
It’s a behavior specifically for my company project, they use the “+” and “-“ to create a “ pro and cons” list, putting an image for each of case... so basically a bullet list with special bullets |
If you're only concerned with lists and no other markdown, you could forego the use of
This wouldn't be hard to do, plus you wouldn't need to depend on another framework that does far more than you need. If however you do need full markdown support, you could still use the aforementioned approach but it would require a more complicated workaround. You'd need to prevent If either of these approaches seem worth trying, let me know and I would be happy to share some tips to point you in the right direction. |
@cpvbruno Just a quick follow up, there is an open PR (commonmark/cmark#226) on the cmark repo that would make it possible to determine which list marker was parsed. It's been open for a long time and doesn't seem to be getting any attention, but you could make some noise there to try to get a maintainer to look at it. |
I'll do it thanks, the first case you mentioned didn't work in my case :/ but thanks anyway |
Styler
without having to implement everything again?Styler
know which list item marker was parsed?
Hi, I need to customise a specific part of my markdown string, can I customise just it in some way? Or do I need to create a styler and implement the entire protocol?
Also I think I can't use CSS.
Basically what I need is when I have a list that starts with "+" instead of "*" I need to put a different list style with a specific image
The text was updated successfully, but these errors were encountered: