-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Custom markup symbols (bold/italic) instead of the defaults #122
Comments
Yes, but the documentation for that is not good yet. Demo:
Yes, the aftertext directives can be added/expanded easily. In theory. In practice that code is a bit messy and it's on my todo list to clean it up. But you can absolutely bank on it that this is not only possible but is possible and will be very easy in later versions. |
|
The demo is for overriding asterisks as a prefix, but I only meant asterisks as used in the
So that could be a "global" override instead of being used for every piece of text (as far as I understand from https://breckyunits.com/aftertext.html)? Similarly to how your demo allows a global override of the asterisk as a prefix |
Oh that makes sense. Sorry I read it wrong. The relevant line of source code is scroll/parsers/aftertext.parsers Line 216 in e20dc4a
I can clean this code up soon to make it easier to accomplish what you want. Good idea! |
|
Would be nice indeed if all one had to do was something like "substitute wrapsOnParser" and just change this one For example, I see that here is |
|
Okay. I added a |
|
Looks great, and even nested markup works, playground example! Though for some reason (triple symbol works, but isn't a proper escape since while printing doesn't surround the actual backtick in "code" highlight? |
Great to hear!
I've found I rarely need escapes, and in those cases I just use a If one needed escapes a lot, I'd probably suggest building one's own paragraph parser perhaps. |
Is Scroll flexible enough to allow Parsers to be extended to replace the default markup symbols?
For example, I'd like the asterisk to just be an actual asterisk and use something else for bold
Or make the underline used for underlining text and something else for italics?
The text was updated successfully, but these errors were encountered: