summaryrefslogtreecommitdiff
path: root/pygments/lexers/ruby.py
diff options
context:
space:
mode:
authorAnteru <bitbucket@ca.sh13.net>2018-12-21 16:23:58 +0000
committerAnteru <bitbucket@ca.sh13.net>2018-12-21 16:23:58 +0000
commit5e5f02aa70471bafc6f4b61101e2099514596b91 (patch)
treedf0cc3084d797532d585780b3b9f4793da1b263b /pygments/lexers/ruby.py
parentead0ddfe75a8ae8e051d3c4cbc780a472e107654 (diff)
parent2fcf07e09ccb72b7b2e73cffa8492fa0d5cb23db (diff)
downloadpygments-5e5f02aa70471bafc6f4b61101e2099514596b91.tar.gz
Merged in bgcook/pygments-main (pull request #760)
add Slurm script parser
Diffstat (limited to 'pygments/lexers/ruby.py')
-rw-r--r--pygments/lexers/ruby.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/pygments/lexers/ruby.py b/pygments/lexers/ruby.py
index fe750f1a..ce2fc7a7 100644
--- a/pygments/lexers/ruby.py
+++ b/pygments/lexers/ruby.py
@@ -403,8 +403,8 @@ class RubyConsoleLexer(Lexer):
aliases = ['rbcon', 'irb']
mimetypes = ['text/x-ruby-shellsession']
- _prompt_re = re.compile('irb\([a-zA-Z_]\w*\):\d{3}:\d+[>*"\'] '
- '|>> |\?> ')
+ _prompt_re = re.compile(r'irb\([a-zA-Z_]\w*\):\d{3}:\d+[>*"\'] '
+ r'|>> |\?> ')
def get_tokens_unprocessed(self, text):
rblexer = RubyLexer(**self.options)
@@ -498,11 +498,11 @@ class FancyLexer(RegexLexer):
(r'[a-zA-Z](\w|[-+?!=*/^><%])*:', Name.Function),
# operators, must be below functions
(r'[-+*/~,<>=&!?%^\[\].$]+', Operator),
- ('[A-Z]\w*', Name.Constant),
- ('@[a-zA-Z_]\w*', Name.Variable.Instance),
- ('@@[a-zA-Z_]\w*', Name.Variable.Class),
+ (r'[A-Z]\w*', Name.Constant),
+ (r'@[a-zA-Z_]\w*', Name.Variable.Instance),
+ (r'@@[a-zA-Z_]\w*', Name.Variable.Class),
('@@?', Operator),
- ('[a-zA-Z_]\w*', Name),
+ (r'[a-zA-Z_]\w*', Name),
# numbers - / checks are necessary to avoid mismarking regexes,
# see comment in RubyLexer
(r'(0[oO]?[0-7]+(?:_[0-7]+)*)(\s*)([/?])?',