Skip to content

Commit cf37996

Browse files
committed
first pass as docs for what regex features we support
1 parent 9c2eb99 commit cf37996

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/language-guide.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,23 @@ Many languages share common modes and regular expressions. Such expressions are
258258
at the end under "Common regexps" and "Common modes" titles. Use them when possible.
259259

260260

261+
Regular Expression Features
262+
---------------------------
263+
264+
The goal of Highlight.js is to support whatever regex features Javascript itself supports. You're using real regular expressions, use them responsibly. That said, due to the design of the parser, there are some caveats. These are addressed below.
265+
266+
Things we support now that we did not always:
267+
268+
* look-ahead matching for `begin` (#2135)
269+
* look-ahead matching for `illegal` (#2135)
270+
* back-references within your regex (#1897)
271+
272+
Things we currently know are still issues:
273+
274+
* look-ahead matching for `end` matchers
275+
* look-behind matching (when JS supports it) for `end` matchers
276+
277+
261278
Contributing
262279
------------
263280

0 commit comments

Comments
 (0)