Merge pull request #105 from GerbenWelter/add_vte_regex_reference

Fix TODO for documenting vte regex matching constants
This commit is contained in:
Matt Rose 2020-05-24 22:14:51 -04:00 committed by GitHub
commit 9d5c2a6bb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -6,8 +6,10 @@ import gi
gi.require_version('Vte', '2.91') # vte-0.38 (gnome-3.14) gi.require_version('Vte', '2.91') # vte-0.38 (gnome-3.14)
from gi.repository import GLib, Vte from gi.repository import GLib, Vte
# constants for vte regex matching # constants for vte regex matching are documented in the pcre2 api:
# TODO: Please replace with a proper reference to VTE, I found none! # https://www.pcre.org/current/doc/html/pcre2api.html
# the corresponding bits are defined here:
# https://vcs.pcre.org/pcre2/code/trunk/src/pcre2.h.in?view=markup
PCRE2_MULTILINE = 0x00000400 PCRE2_MULTILINE = 0x00000400
FLAGS_GLIB = (GLib.RegexCompileFlags.OPTIMIZE | GLib.RegexCompileFlags.MULTILINE) FLAGS_GLIB = (GLib.RegexCompileFlags.OPTIMIZE | GLib.RegexCompileFlags.MULTILINE)
if hasattr(Vte, 'REGEX_FLAGS_DEFAULT'): if hasattr(Vte, 'REGEX_FLAGS_DEFAULT'):