projects
/
ganeti-local
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
New RPC to get size and spindles of disks
[ganeti-local]
/
lib
/
build
/
shell_example_lexer.py
diff --git
a/lib/build/shell_example_lexer.py
b/lib/build/shell_example_lexer.py
index
c250615
..
401ad65
100644
(file)
--- a/
lib/build/shell_example_lexer.py
+++ b/
lib/build/shell_example_lexer.py
@@
-46,12
+46,13
@@
class ShellExampleLexer(RegexLexer):
# switch to state input on '$ ' at the start of the line
(r"^\$ ", Text, "input"),
(r"\s+", Text),
# switch to state input on '$ ' at the start of the line
(r"^\$ ", Text, "input"),
(r"\s+", Text),
- (r"[^#%\s]+", Text),
+ (r"[^#%\s\\]+", Text),
+ (r"\\", Text),
],
"input": [
include("comments"),
include("userinput"),
],
"input": [
include("comments"),
include("userinput"),
- (r"[^%\\\s]+", Generic.Strong),
+ (r"[^#%\s\\]+", Generic.Strong),
(r"\\\n", Generic.Strong),
(r"\\", Generic.Strong),
# switch to prev state at non-escaped new-line
(r"\\\n", Generic.Strong),
(r"\\", Generic.Strong),
# switch to prev state at non-escaped new-line
@@
-62,7
+63,7
@@
class ShellExampleLexer(RegexLexer):
(r"#.*\n", Comment.Single),
],
"userinput": [
(r"#.*\n", Comment.Single),
],
"userinput": [
- (r"\\%", Text),
+ (r"(\\)(%)", bygroups(None, Text)),
(r"(%)([^%]*)(%)", bygroups(None, Name.Variable, None)),
],
}
(r"(%)([^%]*)(%)", bygroups(None, Name.Variable, None)),
],
}