31 filenames = ['*.bib'] |
31 filenames = ['*.bib'] |
32 mimetypes = ["text/x-bibtex"] |
32 mimetypes = ["text/x-bibtex"] |
33 flags = re.IGNORECASE |
33 flags = re.IGNORECASE |
34 |
34 |
35 ALLOWED_CHARS = r'@!$&*+\-./:;<>?\[\\\]^`|~' |
35 ALLOWED_CHARS = r'@!$&*+\-./:;<>?\[\\\]^`|~' |
36 IDENTIFIER = '[{0}][{1}]*'.format('a-z_' + ALLOWED_CHARS, r'\w' + ALLOWED_CHARS) |
36 IDENTIFIER = '[{}][{}]*'.format('a-z_' + ALLOWED_CHARS, r'\w' + ALLOWED_CHARS) |
37 |
37 |
38 def open_brace_callback(self, match, ctx): |
38 def open_brace_callback(self, match, ctx): |
39 opening_brace = match.group() |
39 opening_brace = match.group() |
40 ctx.opening_brace = opening_brace |
40 ctx.opening_brace = opening_brace |
41 yield match.start(), Punctuation, opening_brace |
41 yield match.start(), Punctuation, opening_brace |