You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to be able to convert more elements to "plain text", for example, when it sees {color:red}Red Text{color}, I'd like the conversion to only have Red Text.
I'm not familiar with pyparsing, so I'm wondering if you have suggestions on the "best" way to override the various classes in the markup directory.
Perhaps you can provide some examples of how to convert some of the various classes of markup to "just text"?
The text was updated successfully, but these errors were encountered:
You can use the element parser class you want to change the behavior of as a base class. Then you need to update ether action method (if exists) or expr method. In the case of the color tag, the code may look like this:
Thanks for the example — I had been able to override some simple inline examples by just setting QUOTE_CHAR and END_QUOTE_CHAR in the custom classes, but wasn't sure what was needed for a more complex token. Your example helps a lot.
First, thanks for a great library! 🎉
I'd like to be able to convert more elements to "plain text", for example, when it sees
{color:red}Red Text{color}
, I'd like the conversion to only haveRed Text
.I'm not familiar with pyparsing, so I'm wondering if you have suggestions on the "best" way to override the various classes in the
markup
directory.Perhaps you can provide some examples of how to convert some of the various classes of markup to "just text"?
The text was updated successfully, but these errors were encountered: