@@ -5,7 +5,7 @@ class Liquid < Scanner
5
5
6
6
register_for :liquid
7
7
8
- DIRECTIVE_KEYWORDS = /endlist|list|endfor|for|endwrap|wrap|endif|if|endunless|unless|elsif|assignlist|assign|cycle|capture|end|capture|fill|endiflist|iflist|else/
8
+ DIRECTIVE_KEYWORDS = /paginate| endlist|list|endfor|for|endwrap|wrap|endif|if|endunless|unless|elsif|assignlist|assign|cycle|capture|end|capture|fill|endiflist|iflist|else/
9
9
10
10
MATH = /==|=|!=|>|<=|<|>|\+ /
11
11
@@ -97,6 +97,11 @@ def scan_key_value_pair(encoder, options, match)
97
97
def scan_selector ( encoder , options , match )
98
98
scan_spaces ( encoder )
99
99
if scan_key_value_pair ( encoder , options , match )
100
+ scan_spaces ( encoder )
101
+ if match = scan ( /\+ / )
102
+ encoder . text_token match , :directive
103
+ end
104
+ scan_spaces ( encoder )
100
105
scan_selector ( encoder , options , match )
101
106
else
102
107
false
@@ -109,7 +114,7 @@ def scan_directive(encoder, options, match)
109
114
if match = scan ( /#{ DIRECTIVE_KEYWORDS } /o )
110
115
encoder . text_token match , :directive
111
116
scan_spaces ( encoder )
112
- if match =~ /if|assign|assignlist|for|list/
117
+ if match =~ /if|assign|assignlist|for|list|paginate /
113
118
scan_selector ( encoder , options , match )
114
119
if match = scan ( /\w +\. ?\w */ )
115
120
encoder . text_token match , :variable
0 commit comments