A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/xavierog/codemirror-mode-pcre below:

xavierog/codemirror-mode-pcre: Perl Compatible Regular Expressions (PCRE) mode for CodeMirror

This is a CodeMirror mode that brings syntax highlighting for Perl Compatible Regular Expressions (PCRE).

Load pcre.js and pcre.css at adequate locations in your HTML structure. Mention mode: 'pcre' when creating your CodeMirror instance.

codemirror-mode-pcre supports extended mode (x flag) and actually enables it by default. This can be turned off by passing extended: false when creating the CodeMirror instance.

This mode does not leverage CodeMirror's default tokens (they are not exactly fitted for regular expressions). Consequently, if you use a theme other than the default one, you will likely want to write your own pcre.css file.

Breaking change: starting with version 2.0.0, the cm-end-group style is no longer supported and should no longer be used. It is replaced with cm-start-group.

codemirror-mode-pcre can be nested within another mode, i.e. it can highlight regular expressions for another mode. This requires adjusting the other mode though. See the demo page for an example of such nesting.

codemirror-mode-pcre does not offer:

Those may come in the future though.

Like the PCRE library, this mode is released under the 3-clause BSD license.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4