lib/opulent/tokens.rb in opulent-1.4.8 vs lib/opulent/tokens.rb in opulent-1.5.0
- old
+ new
@@ -1,8 +1,9 @@
+# @Opulent
module Opulent
- # Opulent Keywords
- Keywords = %i(def yield include if else elsif unless case when each while until doctype)
+ # Opulent KEYWORDS
+ KEYWORDS = %i(def yield include if else elsif unless case when each while until doctype)
# @Tokens
class Tokens
# All tokens available within Opulent
#
@@ -22,11 +23,11 @@
leading_whitespace: /\A(\<\-)/,
leading_trailing_whitespace: /\A(\>)/,
trailing_whitespace: /\A(\-\>)/,
# Self enclosing node
- self_enclosing: /\A\/(.*)/,
+ self_enclosing: %r{\A\/(.*)},
# Definition
def: /\Adef +/,
# Definition
@@ -47,10 +48,10 @@
# Node inline child
inline_child: /\A *\> */,
# Comments
- comment: /\A\//,
+ comment: %r{\A\/},
# Intepreted filters
filter: /\A\:[a-zA-Z]([\-\_]?[a-zA-Z0-9]+)*/,
# Print nodes