-
-
Notifications
You must be signed in to change notification settings - Fork 169
Adding support for subscript, highlighted and underlined text #302
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
Conversation
- One '~' produces a subscript instead of strikethrough - "==" highlights the text inside it
|
Hi there! Thanks so much for this high-quality submission! There's one major issue, which is that this changes the behaviour of the strikethrough extension, even when subscript isn't enabled. This causes an incompatibility with GitHub Flavored Markdown. I'd be happy to accept the proposed change if this was addressed -- I'd be okay with subscript being enabled changing strikethrough's behaviour accordingly, but not with it disabled (i.e. GFM defaults). Right now there's an "interesting" bug that results where enabling only strikethrough (not subscript) and then using one I'll leave some more comments inline. |
|
|
||
| if self.options.extension.strikethrough | ||
| && opener_char == b'~' | ||
| && (opener_num_chars != closer_num_chars || opener_num_chars > 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect (though haven't checked) this will cause spec failure with this example. The spec requires three or more tildes to not generate a strikethrough; since we've already subtracted use_delims (2 for a strikethrough of length 2 or more) from opener_num_chars, if we had 3 or more, opener_num_chars > 0 would be true and so we'd return None here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If subscript and strikethrough, both are enabled, it will be a subscript as well as a strikethrough\ like in cases of italics and bolds. Considering this, I removed the condition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding and additional && to check if subscript is enabled. Like
if (self.options.extension.strikethrough
&& opener_char == b'~'
&& (opener_num_chars != closer_num_chars || opener_num_chars > 0))
&& !self.options.extension.subscript
{
return None;
}|
Can I add a new feature of |
- Added underlined/inserted text support using `++` - Fixed to confirm GFM strikethrough specs when subscript not enabled - Fixed some code based on PR suggestions
|
Can I get some info regarding the |
|
Any other changes/improvements required? As I see it is still open. |
|
I'm currently sick and unable to review the PR. I will when I can. |
|
any updates on this? |
|
No updates. With my limited energy I've been prioritising bug fixes and upstream compliance. |
Uh oh!
There was an error while loading. Please reload this page.