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

Add new inline Markdown underline rule #1476

Merged
merged 22 commits into from
Feb 23, 2021

Conversation

wxwxwxwx9
Copy link
Contributor

@wxwxwxwx9 wxwxwxwx9 commented Feb 10, 2021

What is the purpose of this pull request?

  • Documentation update
  • Bug fix
  • Feature addition or enhancement
  • Code maintenance
  • Others, please explain:

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 of markdown-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:
Create a new md file in your Markbind and test out the following syntaxes: ++underline++, $$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 syntax
in v3.0 as ++ will be used for increasing text size instead.

To ensure a smoother transition for users, let's add $$ syntax
for underline as well, so that users have time to switch their
underline syntax over to $$ before we deprecate ++ fully.


Checklist: ☑️

  • Updated the documentation for feature additions and enhancements
  • Added tests for bug fixes or features
  • Linked all related issues
  • No blatantly unrelated changes
  • Pinged someone for a review!

@wxwxwxwx9 wxwxwxwx9 changed the title Underline $$ text Add new inline Markdown underline rule Feb 10, 2021
@ang-zeyu
Copy link
Contributor

@wxwxwxwx9 looks like there's still some failing tests, could you check these out?

Untitled

@wxwxwxwx9
Copy link
Contributor Author

@ang-zeyu thanks for highlighting! There were some minor areas that I overlooked. I have updated them, it should be fine now :-)

Copy link
Contributor

@ang-zeyu ang-zeyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm 👍

@ang-zeyu ang-zeyu added this to the v2.17.0 milestone Feb 23, 2021
@ang-zeyu ang-zeyu merged commit 1305523 into MarkBind:v2.7.x-hotfixes Feb 23, 2021
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

Successfully merging this pull request may close these issues.

None yet

2 participants