Changeset 135
- Timestamp:
- 01/22/2007 02:00:27 (22 months ago)
- Location:
- branches/superredcloth
- Files:
-
- 2 modified
-
ext/superredcloth_scan/superredcloth_scan.rl (modified) (1 diff)
-
lib/superredcloth.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/superredcloth/ext/superredcloth_scan/superredcloth_scan.rl
r134 r135 43 43 action A { reg = p; } 44 44 action X { regs = rb_hash_new(); reg = NULL; } 45 action cat { rb_str_ append(block, rb_funcall(super_RedCloth, rb_intern("escape"), 1, rb_str_new(tokstart, tokend-tokstart))); }45 action cat { rb_str_cat(block, tokstart, tokend-tokstart); } 46 46 47 47 # minor character groups -
branches/superredcloth/lib/superredcloth.rb
r134 r135 75 75 txt.gsub(/&/, '&') 76 76 end 77 def escape txt78 txt.gsub(/&/, '&').gsub(/'/, "’").gsub(/</, '<').gsub(/>/, '>').gsub(/"/, '"')79 end80 77 end