Sha256: b5199150c9735c0edfd5bcfd96b6e81e8245c3499f3715b99388e2897f21e60a
Contents?: true
Size: 848 Bytes
Versions: 1
Compression:
Stored size: 848 Bytes
Contents
/* * redcloth_attributes.rl * * Copyright (C) 2008 Jason Garber */ %%{ machine redcloth_attributes; C2_CLAS = ( "(" ( [^)#]+ >A %{ STORE("class_buf"); } )? ("#" [^)]+ >A %{STORE("id_buf");} )? ")" ) ; C2_LNGE = ( "[" [^\[\]]+ >A %{ STORE("lang_buf"); } "]" ) ; C2_STYL = ( "{" [^}]+ >A %{ STORE("style_buf"); } "}" ) ; C2 = ( C2_CLAS | C2_STYL | C2_LNGE )+ ; mtext_with_attributes = ( C2 mtext >A %T ) >X ; inline := |* mtext_with_attributes { SET_ATTRIBUTES(); } ; *|; link_text_with_attributes = C2 "."* " "* ( mtext+ ) >A %{ STORE("name"); } ; link_text_without_attributes = ( mtext+ ) >B %{ STORE_B("name_without_attributes"); } ; link_says := |* link_text_with_attributes { SET_ATTRIBUTES(); } ; link_text_without_attributes { SET_ATTRIBUTE("name_without_attributes", "name"); } ; *|; }%%;
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
jeremy-RedCloth-4.1.1 | ext/redcloth_scan/redcloth_attributes.rl |