mirror of
https://github.com/kemko/liquid.git
synced 2026-01-10 03:55:44 +03:00
Some more documentation for regexpes
This commit is contained in:
@@ -22,16 +22,33 @@
|
||||
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
||||
|
||||
module Liquid
|
||||
FilterSeparator = /\|/
|
||||
ArgumentSeparator = ','
|
||||
FilterArgumentSeparator = ':'
|
||||
VariableAttributeSeparator = '.'
|
||||
TagStart = /\{\%/
|
||||
TagEnd = /\%\}/
|
||||
VariableSignature = /\(?[\w\-\.\[\]]\)?/
|
||||
VariableSegment = /[\w\-]\??/
|
||||
|
||||
# Basic apperence:
|
||||
|
||||
# Tags {% look like this %}
|
||||
TagStart = /\{%/
|
||||
TagEnd = /%\}/
|
||||
|
||||
# Variables {{look}} like {{this}}
|
||||
VariableStart = /\{\{/
|
||||
VariableEnd = /\}\}/
|
||||
|
||||
# Arguments are passed {% like: this %}
|
||||
FilterArgumentSeparator = ':'
|
||||
|
||||
# Hashes are separated {{ like.this }}
|
||||
VariableAttributeSeparator = '.'
|
||||
|
||||
# Filters are piped in {{ like | this }}
|
||||
FilterSeparator = /\|/
|
||||
|
||||
# Muliple arguments are {% separated: like, this %}
|
||||
ArgumentSeparator = ','
|
||||
|
||||
|
||||
# Lexical parsing regexped go below.
|
||||
VariableSignature = /\(?[\w\-\.\[\]]\)?/
|
||||
VariableSegment = /[\w\-]\??/
|
||||
VariableIncompleteEnd = /\}\}?/
|
||||
QuotedString = /"[^"]+"|'[^']+'/
|
||||
QuotedFragment = /#{QuotedString}|(?:[^\s,\|'"]|#{QuotedString})+/
|
||||
|
||||
Reference in New Issue
Block a user