Skip to content
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

Request: Allow TagSyntax with unmatched tags #350

Open
brianrobles204 opened this issue Jan 2, 2021 · 0 comments
Open

Request: Allow TagSyntax with unmatched tags #350

brianrobles204 opened this issue Jan 2, 2021 · 0 comments

Comments

@brianrobles204
Copy link

Hello,

I'm trying to implement reddit's superscript syntax as a custom inline syntax. Since superscript text can have other tags inside of it, I need to use the TagSyntax API, but the API usually expects some closing tag, whereas superscript text like ^example works without one.

I'd also like to handle cases like **^example** where the superscript should be recognized before any spaces or line ends, instead of being flattened out by the strong tag.

I think the best way to include this feature this would be a special case within TagState.close, where we check each unmatched TagSyntax if they want to optionally handle how they're closed, instead of just flattening all of them into the closing tag. I can try writing a PR if this sounds like a good idea. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant