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
>>>importbbcode>>>bbcode.render_html('He said "[I]n the matter of X v Y, X wins".')
'He said "<em>n the matter of X v Y, X wins".</em>'
Is it possible to have the mis-identified tag – or tags in general – not close except when there is a matching closing tag, eg [/i]? (Such behaviour is default in phpBB, for example).
Thanks for any help.
The text was updated successfully, but these errors were encountered:
If I understand what you're asking for, this isn't currently possible, but it's a good idea. I think it mostly belongs as a tag option (require_close), but also maybe have a Parser.strict mode switch to set require_close on any installed tag that doesn't explicitly set the option. Obviously some tags (standalone and same_tag_closes; i.e. [hr] and [*]) should not ever require closing tags, even in strict mode.
At first glance, I think it will require changing _find_closing_token to return whether a closing token was actually found or not. Then _format_tokens can act accordingly.
I'll have a look, but can't promise any specific timeline.
Thanks for taking a look. If I get some time (some IRL stuff has intervened) I'll perhaps take a look myself. Though I think the thing to do would instead be to merely pass the "tag" on unchanged rather than something like require_close? Unless I am misunderstanding your comment.
Given input like:
Is it possible to have the mis-identified tag – or tags in general – not close except when there is a matching closing tag, eg
[/i]
? (Such behaviour is default in phpBB, for example).Thanks for any help.
The text was updated successfully, but these errors were encountered: