[gtksourceview] ruby.lang: Fix for 3 digit octal-escaped string



commit 79de019354854217a79c7bfb6a8cf34bc0b9659d
Author: Y.N <yukihiro nakai access-company com>
Date:   Thu Oct 31 06:09:38 2019 +0000

    ruby.lang: Fix for 3 digit octal-escaped string

 data/language-specs/ruby.lang     | 3 ++-
 tests/syntax-highlighting/file.rb | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/data/language-specs/ruby.lang b/data/language-specs/ruby.lang
index ed08572a..ff2625b2 100644
--- a/data/language-specs/ruby.lang
+++ b/data/language-specs/ruby.lang
@@ -8,6 +8,7 @@
  Copyright (C) 2005 Michael Witrant <mike lepton fr>
  Copyright (C) 2006 Gabriel Bauman <gabe codehaus org>
  Copyright (C) 2013 Jesse van den Kieboom <jessevdk gnome org>
+ Copyright (C) 2019 Yukihiro Nakai
 
  GtkSourceView is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
@@ -58,7 +59,7 @@
   <definitions>
 
     <context id="escape" style-ref="escape">
-      <match>\\((0-7){3}|(x[a-fA-F0-9]{2})|(c\S)|([CM]-\S)|(M-C-\S)|.)</match>
+      <match>\\([0-7]{3}|(x[a-fA-F0-9]{2})|(c\S)|([CM]-\S)|(M-C-\S)|.)</match>
     </context>
 
     <context id="multiline-comment" style-ref="comment" class="comment" class-disabled="no-spell-check">
diff --git a/tests/syntax-highlighting/file.rb b/tests/syntax-highlighting/file.rb
new file mode 100644
index 00000000..04f71244
--- /dev/null
+++ b/tests/syntax-highlighting/file.rb
@@ -0,0 +1,3 @@
+#!/usr/bin/env ruby
+#
+puts "\141" # Shows 'a'


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]