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

Fix bug to allow highlighting of code with '-' #2132

Merged

Conversation

yucheng11122017
Copy link
Contributor

@yucheng11122017 yucheng11122017 commented Feb 4, 2023

Note: this PR is a follow-up to #2125 to rectify the accidental merge.

What is the purpose of this pull request?

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

Overview of changes:
Trying to highlight code which contained a '-' did not work since the highlight rules were parsed according to '-'.
Eg. {highlight-lines="1['block-level']"}
Change to parse using regex in which '-' cannot be within a [].

Anything you'd like to highlight/discuss:

Testing instructions:

 ```{highlight-lines="1['block-level']"}
<markdown> elements allow block-level markdown without needing a leading newline.
Hence, the contained markdown should be parsed and output as is, without any parsing errors.
</invalidhtml>
 ```

Proposed commit message: (wrap lines at 72 characters)
Fix bug to allow highlighting of code with '-'


Checklist: ☑️

  • Updated the documentation for feature additions and enhancements
  • Added tests for bug fixes or features
  • Linked all related issues
  • No unrelated changes

Copy link
Contributor

@ong6 ong6 left a comment

Choose a reason for hiding this comment

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

LGTM

jovyntls

This comment was marked as outdated.

Copy link
Contributor

@jovyntls jovyntls left a comment

Choose a reason for hiding this comment

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

Working on my end! LGTM

@jovyntls jovyntls added this to the 4.0.3 milestone Feb 5, 2023
@jovyntls jovyntls changed the title Fix bug where cannot highlight dash Fix bug to allow highlighting of code with '-' Feb 5, 2023
@jovyntls jovyntls merged commit 3c24312 into MarkBind:master Feb 5, 2023
@tlylt
Copy link
Contributor

tlylt commented Feb 7, 2023

@all-contributors please add @yucheng11122017 for code

@allcontributors
Copy link
Contributor

@tlylt

I've put up a pull request to add @yucheng11122017! 🎉

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.

4 participants