Changeset 253
- Timestamp:
- 03/07/2008 15:23:23 (9 months ago)
- Location:
- branches/superredcloth/ext/superredcloth_scan
- Files:
-
- 2 modified
-
superredcloth.h (modified) (2 diffs)
-
superredcloth_inline.rl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/superredcloth/ext/superredcloth_scan/superredcloth.h
r247 r253 53 53 #define STORE_URL(T) \ 54 54 if (p > reg && reg >= ts) { \ 55 p++; \56 55 char punct = 1; \ 57 56 while (p > reg && punct == 1) { \ … … 67 66 } \ 68 67 STORE(T); \ 69 p--; \70 68 if ( !NIL_P(refs) && rb_funcall(refs, rb_intern("has_key?"), 1, rb_hash_aref(regs, ID2SYM(rb_intern(#T)))) ) { \ 71 69 rb_hash_aset(regs, ID2SYM(rb_intern(#T)), rb_hash_aref(refs, rb_hash_aref(regs, ID2SYM(rb_intern(#T))))); \ -
branches/superredcloth/ext/superredcloth_scan/superredcloth_inline.rl
r247 r253 23 23 # links 24 24 link_says = ( mtext+ ) >A %{ STORE(name) } ; 25 link = ( '"' C "."* " "* link_says " "* :> title? :> '":' %A uri) >X ;25 link = ( "["? '"' C "."* " "* link_says " "* :> title? :> '":' %A uri %{ STORE_URL(href); } :> "]"? ) >X ; 26 26 27 27 # images 28 28 image_src = ( uri ) >A %{ STORE(src) } ; 29 29 image_is = ( A2 C "."* image_src :> title? ) ; 30 image_link = ( ":" uri ) ;31 image = ( " !" image_is "!" %A image_link? ) >X ;30 image_link = ( ":" uri >A %{ STORE_URL(href); } ) ; 31 image = ( "["? "!" image_is "!" %A image_link? "]"? ) >X ; 32 32 33 33 # footnotes … … 74 74 main := |* 75 75 76 image { if ( *reg == ':') { reg += 1; STORE_URL(href); }INLINE(block, image); };77 78 link { STORE_URL(href);PASS(block, name, link); };76 image { INLINE(block, image); }; 77 78 link { PASS(block, name, link); }; 79 79 80 80 code { PASS_CODE(block, text, code); };