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

[Feature] Removal of "nested" highlight #4

Open
schlagmichdoch opened this issue Nov 1, 2022 · 0 comments
Open

[Feature] Removal of "nested" highlight #4

schlagmichdoch opened this issue Nov 1, 2022 · 0 comments

Comments

@schlagmichdoch
Copy link

When we select a highlighted section like so (start and end of selection indicated with (|)):
|Test of a ==highlighted selection== and more|
and the highlight button is clicked I would expext to expand the highlighted section. Two more equal signs are added around the selection but the "nested" highlight equal signs are not removed. This breaks the highlight markdown.

Current Behaviour

When we select a highlighted section like so (start and end of selection indicated with (|)):
|Test of a ==highlighted selection== and more|
clicking the highlight button results in:
==Test of a ==highlighted selection== and more==|

Expected Behaviour

When we select a highlighted section like so (start and end of selection indicated with (|)):
|Test of a ==highlighted selection== and more|
clicking the highlight button should result in:
==Test of a highlighted selection and more==|
or as an intermediate step should remove all equal signs that are in pair of two inside of the selection:
Test of a highlighted selection and more|

How To

  1. count equal signs in pair of two in selection (e.g.: with regex ={2}\b|\b={2})
  2. if (count > 0): remove all pair of two in selection
  3. do highlight as implemented
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

No branches or pull requests

1 participant