herbgobbler 0.3.8 → 0.3.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/grammer/erb_grammer.treetop +19 -1
  2. metadata +2 -2
@@ -9,6 +9,7 @@ grammar ERBGrammer
9
9
  html_end_tag /
10
10
  html_start_tag /
11
11
  html_self_contained /
12
+ text_html_entity /
12
13
  whitespace /
13
14
  text
14
15
  ) (erb)*
@@ -352,6 +353,23 @@ grammar ERBGrammer
352
353
  }
353
354
 
354
355
  end
356
+
357
+ rule non_breaking_space
358
+ ' '
359
+ end
360
+
361
+ rule text_html_entity
362
+ !non_breaking_space ('&' ([a-zA-Z0-9])+ ';') <TextNode>
363
+ {
364
+ def can_be_combined?
365
+ true
366
+ end
367
+
368
+ def node_name
369
+ "text"
370
+ end
371
+ }
372
+ end
355
373
 
356
374
  rule text
357
375
  ((!html_self_contained !html_start_tag !html_end_tag !erb_string !erb_block) . )+ <TextNode>
@@ -381,7 +399,7 @@ grammar ERBGrammer
381
399
  end
382
400
 
383
401
  rule whitespace
384
- ((![a-zA-Z\.] !('<' [a-zA-Z]+) !('</' [a-zA-Z]+) !'<%' !'"' !"'" !'<!' ) . )+ <NonTextNode>
402
+ non_breaking_space / ( (!text_html_entity ![a-zA-Z\.] !('<' [a-zA-Z]+) !('</' [a-zA-Z]+) !'<%' !'"' !"'" !'<!' ) . )+ <NonTextNode>
385
403
  {
386
404
  def can_be_combined?
387
405
  true
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: herbgobbler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.8
4
+ version: 0.3.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-08 00:00:00.000000000 Z
12
+ date: 2012-08-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler