Skip to content

Conversation

@AgentHagu
Copy link
Contributor

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:

Fixes #2573

Overview of changes:
Allows users to now optionally highlight leading whitespace, giving them more options when using MarkBind.

Users can now add an optional + after their highlight index specifier to indicate that the index should be inclusive of leading whitespace. For example previously 1[:4] would highlight the abcd in abcd. But now, by instead using 1[:4]+, MarkBind will highlight ab in abcd (i.e. it will highlight the first 2 whitespace in the string).

Anything you'd like to highlight/discuss:

Testing instructions:

Proposed commit message: (wrap lines at 72 characters)
Add optional leading whitespace highlighting capability


Checklist: ☑️

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

Reviewer checklist:

Indicate the SEMVER impact of the PR:

  • Major (when you make incompatible API changes)
  • Minor (when you add functionality in a backward compatible manner)
  • Patch (when you make backward compatible bug fixes)

At the end of the review, please label the PR with the appropriate label: r.Major, r.Minor, r.Patch.

Breaking change release note preparation (if applicable):

  • To be included in the release note for any feature that is made obsolete/breaking

Give a brief explanation note about:

  • what was the old feature that was made obsolete
  • any replacement feature (if any), and
  • how the author should modify his website to migrate from the old feature to the replacement feature (if possible).

AgentHagu and others added 11 commits December 19, 2024 16:23
dangerfile.js violates eslint rules at the moment, perhaps due to
something wrong with setup.
Update regex and parsing of HighlightRuleComponent to support
"+" symbol, which indicates highlighter index specifiers should
be inclusive of preceding whitespace of the line.
@AgentHagu AgentHagu closed this Jan 13, 2025
@AgentHagu AgentHagu changed the title Highlighter enhancement Add optional leading whitespace highlighting capability Jan 13, 2025
@AgentHagu AgentHagu deleted the highlighter-enhancement branch February 18, 2025 08:56
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.

Highlighting code blocks: leading spaces should be counted

1 participant