Skip to content

Conversation

@joshgoebel
Copy link
Member

@joshgoebel joshgoebel commented Jan 31, 2020

Closes #1723.
Closes #2140.

Closes highlightjs#2140.

- In safe mode 0 width matches will be safely and quietly ignored
  and advance the cursor 1 step, as before.
- In debug mode a "0 width match" error will be thrown.

This should help prevent such misbehaved rules from sneaking back
into the library in the future.
@joshgoebel joshgoebel added this to the 10.0 milestone Jan 31, 2020
@joshgoebel joshgoebel changed the title enh(fortran) support intrinsic data types enh(fortran) support intrinsic data types & better 0 width match error detection Jan 31, 2020
@joshgoebel joshgoebel added the bug label Feb 2, 2020
Copy link
Collaborator

@egor-rogov egor-rogov left a comment

Choose a reason for hiding this comment

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

Looks good.

@joshgoebel joshgoebel merged commit 7be9dc8 into highlightjs:master Feb 6, 2020
taufik-nurrohman pushed a commit to taufik-nurrohman/highlight.js that referenced this pull request Feb 18, 2020
…r detection (highlightjs#2379)

* enh(fortran) support intrinsic data types

Closes highlightjs#1723.

* (parser) throw "0 width match" error for bad regex

Closes highlightjs#2140.

- In safe mode 0 width matches will be safely and quietly ignored
  and advance the cursor 1 step, as before.
- In debug mode a "0 width match" error will be thrown.

This should help prevent such misbehaved rules from sneaking back
into the library in the future.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug enhancement An enhancement or new feature language parser

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Some existing rules are unrepeatable and should be corrected issue in highlighting fortran code: kind of intrinsic data type

2 participants