fixed varname bug and highlighting bug
--HG-- branch : pmacs2
This commit is contained in:
parent
8db9126c65
commit
d57ca798bc
|
@ -18,11 +18,11 @@ class ShGrammar(Grammar):
|
||||||
PatternRule(r'delimiter', r";;|[\[\]\(\);\{\}|&><]"),
|
PatternRule(r'delimiter', r";;|[\[\]\(\);\{\}|&><]"),
|
||||||
RegionRule(r'eval', '`', StringGrammar, '`'),
|
RegionRule(r'eval', '`', StringGrammar, '`'),
|
||||||
RegionRule(r'neval', r'\$\(', StringGrammar, r'\)'),
|
RegionRule(r'neval', r'\$\(', StringGrammar, r'\)'),
|
||||||
PatternRule(r'variable', r"(?:^|(?<= ))[a-zA-Z_][a-zA-Z_][a-zA-Z0-9_]*(?==)"),
|
PatternRule(r'variable', r"(?:^|(?<= ))[a-zA-Z_][a-zA-Z0-9_]*(?==)"),
|
||||||
PatternRule(r'variable', r"\${(?:[a-zA-Z0-9_]+|\?\$)}"),
|
PatternRule(r'variable', r"\${(?:[a-zA-Z0-9_]+|\?\$)}"),
|
||||||
PatternRule(r"variable", r"\$[^({][a-zA-Z0-9_]*"),
|
PatternRule(r"variable", r"\$[^({][a-zA-Z0-9_]*"),
|
||||||
PatternRule(r'variable', r"\$(?=\()"),
|
PatternRule(r'variable', r"\$(?=\()"),
|
||||||
RegionRule(r'string', "'", Grammar(), "'"),
|
RegionRule(r'string', "'", Grammar, "'"),
|
||||||
RegionRule(r'string', '"', StringGrammar, '"'),
|
RegionRule(r'string', '"', StringGrammar, '"'),
|
||||||
PatternRule(r'comment', r'#.*$'),
|
PatternRule(r'comment', r'#.*$'),
|
||||||
PatternRule(r'bareword', r'[a-zA-Z0-9_-]+'),
|
PatternRule(r'bareword', r'[a-zA-Z0-9_-]+'),
|
||||||
|
@ -75,6 +75,7 @@ class Sh(mode2.Fundamental):
|
||||||
|
|
||||||
'string.start': ('green', 'default'),
|
'string.start': ('green', 'default'),
|
||||||
'string.variable': ('yellow', 'default'),
|
'string.variable': ('yellow', 'default'),
|
||||||
|
'string.escaped': ('magenta', 'default'),
|
||||||
'string.null': ('green', 'default'),
|
'string.null': ('green', 'default'),
|
||||||
'string.end': ('green', 'default'),
|
'string.end': ('green', 'default'),
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue