Sha256: a2660c1f9357387e2dc6b626ceb1456713791f3d46525700e06858345d31d255

Contents?: true

Size: 846 Bytes

Versions: 14

Compression:

Stored size: 846 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

14 entries across 14 versions & 2 rubygems

Version Path
BBRedCloth-0.8.8 ext/redcloth_scan/redcloth_attributes.rl
BBRedCloth-0.8.7 ext/redcloth_scan/redcloth_attributes.rl
BBRedCloth-0.8.6 ext/redcloth_scan/redcloth_attributes.rl
BBRedCloth-0.8.5 ext/redcloth_scan/redcloth_attributes.rl
BBRedCloth-0.8.4 ext/redcloth_scan/redcloth_attributes.rl
BBRedCloth-0.8.3 ext/redcloth_scan/redcloth_attributes.rl
BBRedCloth-0.8.2 ext/redcloth_scan/redcloth_attributes.rl
BBRedCloth-0.8.1 ext/redcloth_scan/redcloth_attributes.rl
RedCloth-4.1.0-universal-java ext/redcloth_scan/redcloth_attributes.rl
RedCloth-4.1.1-universal-java ext/redcloth_scan/redcloth_attributes.rl
RedCloth-4.1.0-x86-mswin32-60 ext/redcloth_scan/redcloth_attributes.rl
RedCloth-4.1.0 ext/redcloth_scan/redcloth_attributes.rl
RedCloth-4.1.1-x86-mswin32-60 ext/redcloth_scan/redcloth_attributes.rl
RedCloth-4.1.1 ext/redcloth_scan/redcloth_attributes.rl