-
Notifications
You must be signed in to change notification settings - Fork 123
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
Add new inline Markdown underline rule #1476
Merged
ang-zeyu
merged 22 commits into
MarkBind:v2.7.x-hotfixes
from
wxwxwxwx9:underline-$$-text
Feb 23, 2021
Merged
Add new inline Markdown underline rule #1476
ang-zeyu
merged 22 commits into
MarkBind:v2.7.x-hotfixes
from
wxwxwxwx9:underline-$$-text
Feb 23, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 tasks
@wxwxwxwx9 looks like there's still some failing tests, could you check these out? |
@ang-zeyu thanks for highlighting! There were some minor areas that I overlooked. I have updated them, it should be fine now :-) |
ang-zeyu
approved these changes
Feb 23, 2021
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.
Lgtm 👍
10 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the purpose of this pull request?
This PR is related to #1473 by addressing the intermediary addition of
$$
syntax for underlining, on top of the existing++
, before we fully deprecate++
for underlining and transition to only using$$
.Overview of changes:
I reused our internal existing plugin, markdown-it-dimmed, as a dynamic markdown-it plugin that allows us to define double-delimiter inline rules (e.g. ++, $$, %%). We use
$$
for underlining in this PR.In order to introduce the logging of soon-to-be deprecated underline syntax warning for
++
, I also had to pass down the current working file (context) parameter down, so that it can be passed into the render functions ofmarkdown-it
library.Anything you'd like to highlight / discuss:
Whether the implementation for this version is fine or there should be some other tweaks.
Testing instructions:$$underline$$ .
Create a new md file in your Markbind and test out the following syntaxes: ++underline++,
You should be able to mix-and-match the different syntaxes and achieve a combined result (e.g. %%++underlined_dimmed++%% should give you a text that is underlined and dimmed).
If there is a
++
syntax used for underlining, there will be warning logged as well.Proposed commit message: (wrap lines at 72 characters)
Add new inline Markdown underline rule.
We will be transitioning from
++
to$$
for underlining syntaxin v3.0 as
++
will be used for increasing text size instead.To ensure a smoother transition for users, let's add
$$
syntaxfor underline as well, so that users have time to switch their
underline syntax over to
$$
before we deprecate++
fully.Checklist: ☑️