erbside 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gemspec +152 -0
 - data/.gitignore +8 -0
 - data/.ruby +48 -0
 - data/.yardopts +6 -0
 - data/{HISTORY → HISTORY.rdoc} +0 -0
 - data/MANIFEST +33 -0
 - data/NOTICE.rdoc +32 -0
 - data/PROFILE +6 -3
 - data/README.rdoc +76 -0
 - data/VERSION +1 -1
 - data/lib/erbside.rb +6 -2
 - data/lib/erbside/context.rb +3 -3
 - data/lib/erbside/gemspec.rb +19 -0
 - data/lib/erbside/inline.rb +8 -5
 - data/lib/erbside/inline/cpp.rb +7 -0
 - data/lib/erbside/inline/css.rb +7 -0
 - data/lib/erbside/inline/js.rb +7 -0
 - data/lib/erbside/metadata.rb +86 -50
 - data/lib/erbside/runner.rb +14 -5
 - data/main.assembly +56 -0
 - data/{test/functional → qed}/applique/env.rb +0 -0
 - data/{test/functional → qed}/bash.rdoc +0 -0
 - data/{test/functional → qed}/cli.rdoc +0 -0
 - data/{test/functional → qed}/cpp.rdoc +0 -0
 - data/{test/functional → qed}/css.rdoc +0 -0
 - data/{test/functional → qed}/javascript.rdoc +0 -0
 - data/{test/functional → qed}/ruby.rdoc +0 -0
 - data/{test/functional → qed}/sgml.rdoc +0 -0
 - data/site/.htaccess +2 -0
 - data/site/.rsync-filter +7 -0
 - data/site/assets/css/highlight.css +96 -0
 - data/site/assets/css/reset.css +19 -0
 - data/site/assets/css/site.css +52 -0
 - data/site/assets/img/curb.jpg +0 -0
 - data/site/assets/img/emeraled.png +0 -0
 - data/site/assets/img/fade.png +0 -0
 - data/site/assets/img/fork-me.png +0 -0
 - data/site/assets/img/icon.jpg +0 -0
 - data/site/assets/js/highlight.js +1 -0
 - data/site/assets/js/jquery.js +19 -0
 - data/site/assets/js/jquery.tabs.js +1 -0
 - data/site/index.html +229 -0
 - data/test/{unit/fixture → fixture}/inline.rb +3 -3
 - data/test/{unit/fixture → fixture}/inline_complex.rb +0 -0
 - data/test/inline_test.rb +15 -0
 - data/work/defunct/css/color.css +45 -0
 - data/work/defunct/css/font.css +39 -0
 - data/work/defunct/css/struct.css +51 -0
 - data/work/defunct/inline-old/bash.rb +36 -0
 - data/work/defunct/inline-old/cpp.rb +39 -0
 - data/work/defunct/inline-old/css.rb +32 -0
 - data/work/defunct/inline-old/html.rb +32 -0
 - data/work/defunct/inline-old/js.rb +85 -0
 - data/work/defunct/inline-old/ruby.rb +147 -0
 - data/work/defunct/inline-old/type.rb +91 -0
 - data/work/defunct/inline.rb +202 -0
 - data/work/defunct/plan.rb +37 -0
 - data/work/defunct/tiller.rb +200 -0
 - data/work/defunct/webme/options.yml +4 -0
 - data/work/defunct/whole.rb +221 -0
 - data/{lib → work}/plugins/syckle/erbside.rb +0 -0
 - data/work/radio_earth.jpg +0 -0
 - data/yard.watchr +12 -0
 - metadata +94 -50
 - data/LICENSE +0 -206
 - data/README +0 -88
 - data/test/unit/inline_test.rb +0 -14
 
| 
         @@ -0,0 +1,51 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            /* STRUCTURE */
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            body {margin:0;padding:0;position:relative;}
         
     | 
| 
      
 4 
     | 
    
         
            +
             div {margin:0;padding:0;}
         
     | 
| 
      
 5 
     | 
    
         
            +
              h1 {margin:5px 0;}
         
     | 
| 
      
 6 
     | 
    
         
            +
              li {padding:3px 0;}
         
     | 
| 
      
 7 
     | 
    
         
            +
             pre {margin:10px 0;}
         
     | 
| 
      
 8 
     | 
    
         
            +
             pre code {padding:10px 10px;}
         
     | 
| 
      
 9 
     | 
    
         
            +
             img {border:none;}
         
     | 
| 
      
 10 
     | 
    
         
            +
              td {vertical-align:top;}
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
            /* #header .title .download .logo */
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
            #header {position:relative; padding-right:200px;}
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
            .title {width:720px; margin:0 auto; padding:10px 0;}
         
     | 
| 
      
 17 
     | 
    
         
            +
            .title ul {padding-left: 20px;}
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
            .download {width:200px;height:120px;float:right;margin-top:30px;padding:10px;border:4px solid;-moz-border-radius:20px;border-radius:20px;}
         
     | 
| 
      
 20 
     | 
    
         
            +
            .logo {float:right;margin-top:10px;padding:10px;}
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
            /* #nav .menu */
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
            #nav { position: fixed; padding: 20px; right: 0; top: 40px; width: 200px;
         
     | 
| 
      
 25 
     | 
    
         
            +
              border-top: 4px solid; border-left: 4px solid; border-bottom: 4px solid;
         
     | 
| 
      
 26 
     | 
    
         
            +
              -moz-border-radius-topleft: 20px; -webkit-border-top-left-radius: 20px;
         
     | 
| 
      
 27 
     | 
    
         
            +
              -moz-border-radius-bottomleft: 20px; -webkit-border-bottom-left-radius: 20px;
         
     | 
| 
      
 28 
     | 
    
         
            +
            }
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
            .menu { margin: 0 auto; text-align: left; }
         
     | 
| 
      
 31 
     | 
    
         
            +
            .menu ul { list-style-type: none; margin: 0px; padding: 0px; width: 100%; position: relative; }
         
     | 
| 
      
 32 
     | 
    
         
            +
            .menu ul li { margin: 15px 10px 15px 0; line-height: 20px; }
         
     | 
| 
      
 33 
     | 
    
         
            +
            .menu ul li a { border-top: 0 solid; }
         
     | 
| 
      
 34 
     | 
    
         
            +
             
     | 
| 
      
 35 
     | 
    
         
            +
            /* #main .doc */
         
     | 
| 
      
 36 
     | 
    
         
            +
             
     | 
| 
      
 37 
     | 
    
         
            +
            #main { padding: 0px; padding-right: 200px; }
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
      
 39 
     | 
    
         
            +
            .doc { width: 720px; margin: 0 auto; padding: 20px 0 10px 0; min-height: 890px; }
         
     | 
| 
      
 40 
     | 
    
         
            +
            .doc h2 { border-left: 0px solid; padding-left: 0; }
         
     | 
| 
      
 41 
     | 
    
         
            +
            .doc h2 img { margin: 0 0 0 0; }
         
     | 
| 
      
 42 
     | 
    
         
            +
            .doc h3 { border-bottom: 1px dotted; }
         
     | 
| 
      
 43 
     | 
    
         
            +
             
     | 
| 
      
 44 
     | 
    
         
            +
            /* #footer .copyright */
         
     | 
| 
      
 45 
     | 
    
         
            +
             
     | 
| 
      
 46 
     | 
    
         
            +
            #footer { padding-right: 200px; border-top: 0px solid; margin-top: 10px; }
         
     | 
| 
      
 47 
     | 
    
         
            +
             
     | 
| 
      
 48 
     | 
    
         
            +
            .advert { margin: 30px 0 10px 0; text-align: center; }
         
     | 
| 
      
 49 
     | 
    
         
            +
             
     | 
| 
      
 50 
     | 
    
         
            +
            .copyright { width: 720px; margin: 0 auto; padding: 0 0 30px 0; }
         
     | 
| 
      
 51 
     | 
    
         
            +
             
     | 
| 
         @@ -0,0 +1,36 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            module Till
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
              class Inline
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
                require 'till/inline/type'
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
                # = Base Script Matcher
         
     | 
| 
      
 8 
     | 
    
         
            +
                #
         
     | 
| 
      
 9 
     | 
    
         
            +
                class Bash < Type
         
     | 
| 
      
 10 
     | 
    
         
            +
                  EXTENSIONS = %w{ .sh }
         
     | 
| 
      
 11 
     | 
    
         
            +
                  #PATTERNS   = [
         
     | 
| 
      
 12 
     | 
    
         
            +
                  #  /^(.*?)\#([ \t]*\:till(\+\d*)?\:)(.*?\S.*?)$/,
         
     | 
| 
      
 13 
     | 
    
         
            +
                  #  /^(.*?)\#([ \t]*\:till(\+\d*)?\:)[ \t]*\n(?m:.*?)\#[ \t]*\:end\:/,
         
     | 
| 
      
 14 
     | 
    
         
            +
                  #]
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
                  def self.extensions ; EXTENSIONS ; end
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
                  def self.start?(line)
         
     | 
| 
      
 19 
     | 
    
         
            +
                    if /^(\s*)(.*?)(\s*\#\s*\:till(\+\d*)?\:\s*)/ =~ line
         
     | 
| 
      
 20 
     | 
    
         
            +
                      new($&, $1, $2, $3, $4, $')
         
     | 
| 
      
 21 
     | 
    
         
            +
                    end
         
     | 
| 
      
 22 
     | 
    
         
            +
                  end
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
                  def stop?(line)
         
     | 
| 
      
 25 
     | 
    
         
            +
                    if /^\s*\#\s*:end:/ =~ line
         
     | 
| 
      
 26 
     | 
    
         
            +
                      $&
         
     | 
| 
      
 27 
     | 
    
         
            +
                    elsif /^\s*[^#]/ =~ line
         
     | 
| 
      
 28 
     | 
    
         
            +
                      true
         
     | 
| 
      
 29 
     | 
    
         
            +
                    end
         
     | 
| 
      
 30 
     | 
    
         
            +
                  end
         
     | 
| 
      
 31 
     | 
    
         
            +
                end
         
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
      
 33 
     | 
    
         
            +
              end
         
     | 
| 
      
 34 
     | 
    
         
            +
             
     | 
| 
      
 35 
     | 
    
         
            +
            end
         
     | 
| 
      
 36 
     | 
    
         
            +
             
     | 
| 
         @@ -0,0 +1,39 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            module Till
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
              class Inline
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
                require 'till/inline/type'
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
                #
         
     | 
| 
      
 8 
     | 
    
         
            +
                class Cpp < Type
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
                  EXTENSIONS = %w{ .c .cpp }
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
                  def self.extensions ; EXTENSIONS ; end
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
                  def self.start(line)
         
     | 
| 
      
 15 
     | 
    
         
            +
                    if /^(\s*)(.*?)(\s*\/(\/|\*)\s*\:till(\+\d*)?\:\s*)/ =~ line
         
     | 
| 
      
 16 
     | 
    
         
            +
                      new($&, $1, $2, $3, $4, $')
         
     | 
| 
      
 17 
     | 
    
         
            +
                    end
         
     | 
| 
      
 18 
     | 
    
         
            +
                  end
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
                  def stop?(line)
         
     | 
| 
      
 21 
     | 
    
         
            +
                    if marker =~ /\/\*/
         
     | 
| 
      
 22 
     | 
    
         
            +
                      if /^.*?\*\// =~ line
         
     | 
| 
      
 23 
     | 
    
         
            +
                        $&
         
     | 
| 
      
 24 
     | 
    
         
            +
                      end
         
     | 
| 
      
 25 
     | 
    
         
            +
                    else
         
     | 
| 
      
 26 
     | 
    
         
            +
                      if /^\s*\#\s*:end:/ =~ line
         
     | 
| 
      
 27 
     | 
    
         
            +
                        $&
         
     | 
| 
      
 28 
     | 
    
         
            +
                      elsif /^\s*(?!:\/\/)/ =~ line
         
     | 
| 
      
 29 
     | 
    
         
            +
                        true
         
     | 
| 
      
 30 
     | 
    
         
            +
                      end
         
     | 
| 
      
 31 
     | 
    
         
            +
                    end
         
     | 
| 
      
 32 
     | 
    
         
            +
                  end
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
                end
         
     | 
| 
      
 35 
     | 
    
         
            +
             
     | 
| 
      
 36 
     | 
    
         
            +
              end
         
     | 
| 
      
 37 
     | 
    
         
            +
             
     | 
| 
      
 38 
     | 
    
         
            +
            end
         
     | 
| 
      
 39 
     | 
    
         
            +
             
     | 
| 
         @@ -0,0 +1,32 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            module Till
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
              class Inline
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
                require 'till/inline/type'
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
                # = CSS Matcher
         
     | 
| 
      
 8 
     | 
    
         
            +
                #
         
     | 
| 
      
 9 
     | 
    
         
            +
                class CSS < Type
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
                  EXTENSIONS = %w{ .css }
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
                  def self.extensions ; EXTENSIONS ; end
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
                  def self.start(line)
         
     | 
| 
      
 16 
     | 
    
         
            +
                    if /^(\s*)(.*?)(\s*\/\*\s*\:till(\+\d*)?\:\s*)/ =~ line
         
     | 
| 
      
 17 
     | 
    
         
            +
                      new($&, $1, $2, $3, $4, $')
         
     | 
| 
      
 18 
     | 
    
         
            +
                    end
         
     | 
| 
      
 19 
     | 
    
         
            +
                  end
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
                  def stop?(line)
         
     | 
| 
      
 22 
     | 
    
         
            +
                    if /^(.*?)\*\/(.*?)$/ =~ line
         
     | 
| 
      
 23 
     | 
    
         
            +
                      $&
         
     | 
| 
      
 24 
     | 
    
         
            +
                    end
         
     | 
| 
      
 25 
     | 
    
         
            +
                  end
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
                end
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
              end
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
            end
         
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
         @@ -0,0 +1,32 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            module Till
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
              class Inline
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
                require 'till/inline/type'
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
                # = HTML Matcher
         
     | 
| 
      
 8 
     | 
    
         
            +
                #
         
     | 
| 
      
 9 
     | 
    
         
            +
                class Html < Type
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
                  EXTENSIONS = %w{ .html }
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
                  def self.extensions ; EXTENSIONS ; end
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
                  def self.start(line)
         
     | 
| 
      
 16 
     | 
    
         
            +
                    if /^(\s*)(.*?)(\s*(<!--)\s*\:till(\+\d*)?\:\s*)/ =~ line
         
     | 
| 
      
 17 
     | 
    
         
            +
                      new($&, $1, $2, $3, $4, $')
         
     | 
| 
      
 18 
     | 
    
         
            +
                    end
         
     | 
| 
      
 19 
     | 
    
         
            +
                  end
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
                  def stop?(line)
         
     | 
| 
      
 22 
     | 
    
         
            +
                    if /-->/ =~ line
         
     | 
| 
      
 23 
     | 
    
         
            +
                      $&
         
     | 
| 
      
 24 
     | 
    
         
            +
                    end
         
     | 
| 
      
 25 
     | 
    
         
            +
                  end
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
                end#class Html
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
              end#class Inline
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
            end#module Till
         
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
         @@ -0,0 +1,85 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            module Till
         
     | 
| 
      
 2 
     | 
    
         
            +
            module Inline
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
                require 'till/inline/type'
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
                #
         
     | 
| 
      
 7 
     | 
    
         
            +
                class Javascript < Parser
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
                  EXTENSIONS = %w{ .js }
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
                  LINE_BACK  = /^(\s*)(.*?)(\s*\/\/\s*\:till)(\+\d*)?(\:)(.*?\S.*?)$/
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
                  LINE_BLOCK = /^(\ *)(.*?)(\ *\/\/\ *\:till(\+\d*)?(\:)(\s*\n))((?m:\/\/.*?\n)*)(\/\/[ \t]*:end:)/
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
                  BLOCK      = /^(.*?)\/\*(\s*\:till(\+\d*)?\:)(?m:.*?)\*\//
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
                  def extensions
         
     | 
| 
      
 18 
     | 
    
         
            +
                    EXTENSIONS
         
     | 
| 
      
 19 
     | 
    
         
            +
                  end
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
                  def parse(text)
         
     | 
| 
      
 22 
     | 
    
         
            +
                    text = parse_line_backs(text)
         
     | 
| 
      
 23 
     | 
    
         
            +
                    text = parse_line_blocks(text)
         
     | 
| 
      
 24 
     | 
    
         
            +
                    text = parse_blocks(text)
         
     | 
| 
      
 25 
     | 
    
         
            +
                  end
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
                  def parse_lines_backs(text)
         
     | 
| 
      
 28 
     | 
    
         
            +
                    text.gsub(LINE_BACK) do |m|
         
     | 
| 
      
 29 
     | 
    
         
            +
                      indent = $1
         
     | 
| 
      
 30 
     | 
    
         
            +
                      front  = $2
         
     | 
| 
      
 31 
     | 
    
         
            +
                      remark = $3 + $4.to_s + $5 + $6
         
     | 
| 
      
 32 
     | 
    
         
            +
                      render = $6.strip
         
     | 
| 
      
 33 
     | 
    
         
            +
                      count  = $4
         
     | 
| 
      
 34 
     | 
    
         
            +
                      #offset = 1
         
     | 
| 
      
 35 
     | 
    
         
            +
                      result = render_template(render)
         
     | 
| 
      
 36 
     | 
    
         
            +
                      format(indent, front, remark, result, count)
         
     | 
| 
      
 37 
     | 
    
         
            +
                    end
         
     | 
| 
      
 38 
     | 
    
         
            +
                  end
         
     | 
| 
      
 39 
     | 
    
         
            +
             
     | 
| 
      
 40 
     | 
    
         
            +
                  def parse_line_blocks(text)
         
     | 
| 
      
 41 
     | 
    
         
            +
                    text.gsub(LINE_BLOCK) do |m|
         
     | 
| 
      
 42 
     | 
    
         
            +
                      indent = $1
         
     | 
| 
      
 43 
     | 
    
         
            +
                      front  = $2
         
     | 
| 
      
 44 
     | 
    
         
            +
                      remark = $3 + $4.to_s + $5 +$6
         
     | 
| 
      
 45 
     | 
    
         
            +
                      render = $7.strip.gsub(/^\s*\/\//, '')
         
     | 
| 
      
 46 
     | 
    
         
            +
                      count  = $3
         
     | 
| 
      
 47 
     | 
    
         
            +
                      result = render_template(render)
         
     | 
| 
      
 48 
     | 
    
         
            +
                      format(indent, front, remark, result, count)
         
     | 
| 
      
 49 
     | 
    
         
            +
                    end
         
     | 
| 
      
 50 
     | 
    
         
            +
                  end
         
     | 
| 
      
 51 
     | 
    
         
            +
             
     | 
| 
      
 52 
     | 
    
         
            +
                  def parse_blocks(text)
         
     | 
| 
      
 53 
     | 
    
         
            +
                    text.gsub(BLOCK) do |m|
         
     | 
| 
      
 54 
     | 
    
         
            +
                      indent = $1
         
     | 
| 
      
 55 
     | 
    
         
            +
                      front  = nil
         
     | 
| 
      
 56 
     | 
    
         
            +
                      remark = $2 + $3.to_s + $4 + $5
         
     | 
| 
      
 57 
     | 
    
         
            +
                      render = $5.strip
         
     | 
| 
      
 58 
     | 
    
         
            +
                      count  = $3
         
     | 
| 
      
 59 
     | 
    
         
            +
                      result = render_template(render)
         
     | 
| 
      
 60 
     | 
    
         
            +
                      format(indent, front, remark, result, count)
         
     | 
| 
      
 61 
     | 
    
         
            +
                    end
         
     | 
| 
      
 62 
     | 
    
         
            +
                  end
         
     | 
| 
      
 63 
     | 
    
         
            +
             
     | 
| 
      
 64 
     | 
    
         
            +
                  #
         
     | 
| 
      
 65 
     | 
    
         
            +
                  def format(indent, front, remark, render, multi=nil)
         
     | 
| 
      
 66 
     | 
    
         
            +
                    size = render.count("\n")
         
     | 
| 
      
 67 
     | 
    
         
            +
                    if multi || size > 0
         
     | 
| 
      
 68 
     | 
    
         
            +
                      indent + remark.sub(/:till(\+\d+)?:/, ":till+#{size}:") + "\n" + render
         
     | 
| 
      
 69 
     | 
    
         
            +
                    else
         
     | 
| 
      
 70 
     | 
    
         
            +
                      if render =~ /^\s*\^/
         
     | 
| 
      
 71 
     | 
    
         
            +
                        b = render.index('^') + 1
         
     | 
| 
      
 72 
     | 
    
         
            +
                        e = render.index(/[<{]/) || - 1
         
     | 
| 
      
 73 
     | 
    
         
            +
                        m = render[b...e]
         
     | 
| 
      
 74 
     | 
    
         
            +
                        i = front.index(m)
         
     | 
| 
      
 75 
     | 
    
         
            +
                        render = front[0...i] + render.sub('^','')
         
     | 
| 
      
 76 
     | 
    
         
            +
                      end
         
     | 
| 
      
 77 
     | 
    
         
            +
                      "\n" + indent + render + remark.sub(/:till(\+\d+)?:/, ":till:") + "\n"
         
     | 
| 
      
 78 
     | 
    
         
            +
                    end
         
     | 
| 
      
 79 
     | 
    
         
            +
                  end
         
     | 
| 
      
 80 
     | 
    
         
            +
             
     | 
| 
      
 81 
     | 
    
         
            +
                end#class Javascript
         
     | 
| 
      
 82 
     | 
    
         
            +
             
     | 
| 
      
 83 
     | 
    
         
            +
            end#module Inline
         
     | 
| 
      
 84 
     | 
    
         
            +
            end#module Till
         
     | 
| 
      
 85 
     | 
    
         
            +
             
     | 
| 
         @@ -0,0 +1,147 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            module Till
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
              class Inline
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
                require 'till/inline/type'
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
                # = Ruby Script Matcher
         
     | 
| 
      
 8 
     | 
    
         
            +
                #
         
     | 
| 
      
 9 
     | 
    
         
            +
                # TODO: Add =begin ... =end matching
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
                class Ruby < Type
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
                  EXTENSIONS = %w{ .rb }
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
                  #PATTERNS   = [
         
     | 
| 
      
 16 
     | 
    
         
            +
                  #  /^(.*?)\#([ \t]*\:till(\+\d*)?\:)(.*?\S.*?)$/,
         
     | 
| 
      
 17 
     | 
    
         
            +
                  #  /^(.*?)\#([ \t]*\:till(\+\d*)?\:)[ \t]*\n(?m:.*?)\#[ \t]*\:end\:/,
         
     | 
| 
      
 18 
     | 
    
         
            +
                  #  /^=begin\s*\:till\:(.*?)^=end/m 
         
     | 
| 
      
 19 
     | 
    
         
            +
                  #]
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
                  def self.extensions ; EXTENSIONS ; end
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
                  def self.start?(line)
         
     | 
| 
      
 24 
     | 
    
         
            +
                    /\#\s*\:till(\+\d*)?\:/ =~ line
         
     | 
| 
      
 25 
     | 
    
         
            +
                  end
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
                  def self.parse(lines, index)
         
     | 
| 
      
 28 
     | 
    
         
            +
                    line = lines[index]
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
                    case line
         
     | 
| 
      
 31 
     | 
    
         
            +
                    when /^(\s*)(.*?)(\s*\#\s*\:till)(\+\d*)?(\:)(.*?\S.*?)$/
         
     | 
| 
      
 32 
     | 
    
         
            +
                      indent = $1
         
     | 
| 
      
 33 
     | 
    
         
            +
                      front  = $2
         
     | 
| 
      
 34 
     | 
    
         
            +
                      remark = $3 + $4.to_s + $5 + $6
         
     | 
| 
      
 35 
     | 
    
         
            +
                      render = $6.strip
         
     | 
| 
      
 36 
     | 
    
         
            +
                      count  = $4
         
     | 
| 
      
 37 
     | 
    
         
            +
                      offset = 1
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
      
 39 
     | 
    
         
            +
                      [indent, front, remark, render, count, offset]
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
                    when /^(\s*)(\#\s*\:till)(\+\d*)?(\:)(\s*)$/
         
     | 
| 
      
 42 
     | 
    
         
            +
                      indent = $1
         
     | 
| 
      
 43 
     | 
    
         
            +
                      front  = nil
         
     | 
| 
      
 44 
     | 
    
         
            +
                      remark = $2 + $3.to_s + $4 + $5
         
     | 
| 
      
 45 
     | 
    
         
            +
                      render = $5.strip
         
     | 
| 
      
 46 
     | 
    
         
            +
                      count  = $3
         
     | 
| 
      
 47 
     | 
    
         
            +
             
     | 
| 
      
 48 
     | 
    
         
            +
                      i, s = index + 1, nil
         
     | 
| 
      
 49 
     | 
    
         
            +
                      until s or i == lines.size
         
     | 
| 
      
 50 
     | 
    
         
            +
                        remain = lines[i]
         
     | 
| 
      
 51 
     | 
    
         
            +
                        s = stop?(remain)
         
     | 
| 
      
 52 
     | 
    
         
            +
                        i += 1
         
     | 
| 
      
 53 
     | 
    
         
            +
                      end
         
     | 
| 
      
 54 
     | 
    
         
            +
             
     | 
| 
      
 55 
     | 
    
         
            +
                      remark = remark + lines[index+1...i].join("\n")
         
     | 
| 
      
 56 
     | 
    
         
            +
                      render = render + lines[index+1...i].join("\n")
         
     | 
| 
      
 57 
     | 
    
         
            +
             
     | 
| 
      
 58 
     | 
    
         
            +
                      [indent, front, remark, render, count, i]
         
     | 
| 
      
 59 
     | 
    
         
            +
                    end
         
     | 
| 
      
 60 
     | 
    
         
            +
                  end
         
     | 
| 
      
 61 
     | 
    
         
            +
             
     | 
| 
      
 62 
     | 
    
         
            +
                  #
         
     | 
| 
      
 63 
     | 
    
         
            +
                  def self.stop?(line)
         
     | 
| 
      
 64 
     | 
    
         
            +
                    if md = /^(\s*)(\#\s*:end:)/.match(line)
         
     | 
| 
      
 65 
     | 
    
         
            +
                      [md, true]
         
     | 
| 
      
 66 
     | 
    
         
            +
                    elsif md = /^(\s*)[^#]/.match(line)
         
     | 
| 
      
 67 
     | 
    
         
            +
                      [md, false]
         
     | 
| 
      
 68 
     | 
    
         
            +
                    end
         
     | 
| 
      
 69 
     | 
    
         
            +
                  end
         
     | 
| 
      
 70 
     | 
    
         
            +
             
     | 
| 
      
 71 
     | 
    
         
            +
                  #
         
     | 
| 
      
 72 
     | 
    
         
            +
                  def self.format(indent, front, remark, render, multi=nil)
         
     | 
| 
      
 73 
     | 
    
         
            +
                    size = render.count("\n")
         
     | 
| 
      
 74 
     | 
    
         
            +
                    if multi || size > 0
         
     | 
| 
      
 75 
     | 
    
         
            +
                      indent + remark.sub(/:till(\+\d+)?:/, ":till+#{size}:") + "\n" + render
         
     | 
| 
      
 76 
     | 
    
         
            +
                    else
         
     | 
| 
      
 77 
     | 
    
         
            +
                      if render =~ /^\s*\^/
         
     | 
| 
      
 78 
     | 
    
         
            +
                        b = render.index('^') + 1
         
     | 
| 
      
 79 
     | 
    
         
            +
                        e = render.index(/[<{]/) || - 1
         
     | 
| 
      
 80 
     | 
    
         
            +
                        m = render[b...e]
         
     | 
| 
      
 81 
     | 
    
         
            +
                        i = front.index(m)
         
     | 
| 
      
 82 
     | 
    
         
            +
                        render = front[0...i] + render.sub('^','')
         
     | 
| 
      
 83 
     | 
    
         
            +
                      end
         
     | 
| 
      
 84 
     | 
    
         
            +
                      "\n" + indent + render + remark.sub(/:till(\+\d+)?:/, ":till:") + "\n"
         
     | 
| 
      
 85 
     | 
    
         
            +
                    end
         
     | 
| 
      
 86 
     | 
    
         
            +
                  end
         
     | 
| 
      
 87 
     | 
    
         
            +
             
     | 
| 
      
 88 
     | 
    
         
            +
                end#class Ruby
         
     | 
| 
      
 89 
     | 
    
         
            +
             
     | 
| 
      
 90 
     | 
    
         
            +
              end#class Inline
         
     | 
| 
      
 91 
     | 
    
         
            +
             
     | 
| 
      
 92 
     | 
    
         
            +
            end#module Till
         
     | 
| 
      
 93 
     | 
    
         
            +
             
     | 
| 
      
 94 
     | 
    
         
            +
             
     | 
| 
      
 95 
     | 
    
         
            +
             
     | 
| 
      
 96 
     | 
    
         
            +
            =begin
         
     | 
| 
      
 97 
     | 
    
         
            +
                #
         
     | 
| 
      
 98 
     | 
    
         
            +
                class Javascript < Type
         
     | 
| 
      
 99 
     | 
    
         
            +
                  EXTENSIONS = %w{ .js }
         
     | 
| 
      
 100 
     | 
    
         
            +
                  PATTERNS   = [
         
     | 
| 
      
 101 
     | 
    
         
            +
                    /^(.*?)\/\/([ \t]*\:till(\+\d*)?\:)(.*?\S.*?)$/,
         
     | 
| 
      
 102 
     | 
    
         
            +
                    /^(.*?)\/\/([ \t]*\:till(\+\d*)?\:)[ \t]*\n(?m:.*?)\/\/[ \t]*\:end\:/,
         
     | 
| 
      
 103 
     | 
    
         
            +
                    /^(.*?)\/\*(\s*\:till(\+\d*)?\:)(?m:.*?)\*\//
         
     | 
| 
      
 104 
     | 
    
         
            +
                  ]
         
     | 
| 
      
 105 
     | 
    
         
            +
             
     | 
| 
      
 106 
     | 
    
         
            +
                  def self.extensions ; EXTENSIONS ; end
         
     | 
| 
      
 107 
     | 
    
         
            +
                  def self.patterns   ; PATTERNS   ; end
         
     | 
| 
      
 108 
     | 
    
         
            +
                end
         
     | 
| 
      
 109 
     | 
    
         
            +
             
     | 
| 
      
 110 
     | 
    
         
            +
             
     | 
| 
      
 111 
     | 
    
         
            +
                #
         
     | 
| 
      
 112 
     | 
    
         
            +
                class Cpp < Type
         
     | 
| 
      
 113 
     | 
    
         
            +
                  EXTENSIONS = %w{ .c .cpp }
         
     | 
| 
      
 114 
     | 
    
         
            +
                  PATTERNS   = [
         
     | 
| 
      
 115 
     | 
    
         
            +
                    /^(.*?)\/\/([ \t]*\:till(\+\d*)?\:)(.*?\S.*?)$/,
         
     | 
| 
      
 116 
     | 
    
         
            +
                    /^(.*?)\/\/([ \t]*\:till(\+\d*)?\:)[ \t]*\n(?m:.*?)\/\/[ \t]*\:end\:/,
         
     | 
| 
      
 117 
     | 
    
         
            +
                    /^(.*?)\/\*(\s*\:till(\+\d*)?\:)(?m:.*?)\*\//
         
     | 
| 
      
 118 
     | 
    
         
            +
                  ]
         
     | 
| 
      
 119 
     | 
    
         
            +
             
     | 
| 
      
 120 
     | 
    
         
            +
                  def self.extensions ; EXTENSIONS ; end
         
     | 
| 
      
 121 
     | 
    
         
            +
                  def self.patterns   ; PATTERNS   ; end
         
     | 
| 
      
 122 
     | 
    
         
            +
                end
         
     | 
| 
      
 123 
     | 
    
         
            +
             
     | 
| 
      
 124 
     | 
    
         
            +
             
     | 
| 
      
 125 
     | 
    
         
            +
                #
         
     | 
| 
      
 126 
     | 
    
         
            +
                class SGML < Type
         
     | 
| 
      
 127 
     | 
    
         
            +
                  EXTENSIONS = %w{ .html }
         
     | 
| 
      
 128 
     | 
    
         
            +
                  PATTERNS   = [
         
     | 
| 
      
 129 
     | 
    
         
            +
                    /^(.*?)<!--(\s*\:till(\+\d*)?\:)(?m:.*?)-->/
         
     | 
| 
      
 130 
     | 
    
         
            +
                  ]
         
     | 
| 
      
 131 
     | 
    
         
            +
             
     | 
| 
      
 132 
     | 
    
         
            +
                  def self.extensions ; EXTENSIONS ; end
         
     | 
| 
      
 133 
     | 
    
         
            +
                  def self.patterns   ; PATTERNS   ; end
         
     | 
| 
      
 134 
     | 
    
         
            +
                end
         
     | 
| 
      
 135 
     | 
    
         
            +
             
     | 
| 
      
 136 
     | 
    
         
            +
                #
         
     | 
| 
      
 137 
     | 
    
         
            +
                class CSS < Type
         
     | 
| 
      
 138 
     | 
    
         
            +
                  EXTENSIONS = %w{ .css }
         
     | 
| 
      
 139 
     | 
    
         
            +
                  PATTERNS   = [
         
     | 
| 
      
 140 
     | 
    
         
            +
                    /^(.*?)\/\*(\s*\:till(\+\d*)?\:)(?m:.*?)\*\//
         
     | 
| 
      
 141 
     | 
    
         
            +
                  ]
         
     | 
| 
      
 142 
     | 
    
         
            +
             
     | 
| 
      
 143 
     | 
    
         
            +
                  def self.extensions ; EXTENSIONS ; end
         
     | 
| 
      
 144 
     | 
    
         
            +
                  def self.patterns   ; PATTERNS   ; end
         
     | 
| 
      
 145 
     | 
    
         
            +
                end
         
     | 
| 
      
 146 
     | 
    
         
            +
            =end
         
     | 
| 
      
 147 
     | 
    
         
            +
             
     | 
| 
         @@ -0,0 +1,91 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            module Till
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
              class Inline
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
                # = Type Base Class
         
     | 
| 
      
 6 
     | 
    
         
            +
                #
         
     | 
| 
      
 7 
     | 
    
         
            +
                class Type
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
                  # C L A S S - M E T H O D S
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
                  #
         
     | 
| 
      
 12 
     | 
    
         
            +
                  def self.map
         
     | 
| 
      
 13 
     | 
    
         
            +
                    @map ||= (
         
     | 
| 
      
 14 
     | 
    
         
            +
                      Type.register.inject({}) do |hash, base|
         
     | 
| 
      
 15 
     | 
    
         
            +
                        base.extensions.each do |ext|
         
     | 
| 
      
 16 
     | 
    
         
            +
                          hash[ext] = base
         
     | 
| 
      
 17 
     | 
    
         
            +
                        end
         
     | 
| 
      
 18 
     | 
    
         
            +
                        hash
         
     | 
| 
      
 19 
     | 
    
         
            +
                      end
         
     | 
| 
      
 20 
     | 
    
         
            +
                    )
         
     | 
| 
      
 21 
     | 
    
         
            +
                  end
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
                  def self.register
         
     | 
| 
      
 24 
     | 
    
         
            +
                    @register ||= []
         
     | 
| 
      
 25 
     | 
    
         
            +
                  end
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
                  def self.inherited(base)
         
     | 
| 
      
 28 
     | 
    
         
            +
                    register << base
         
     | 
| 
      
 29 
     | 
    
         
            +
                  end
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
                  def self.extensions ; raise ; end
         
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
                  ## A T T R I B U T E S
         
     | 
| 
      
 35 
     | 
    
         
            +
             
     | 
| 
      
 36 
     | 
    
         
            +
                  #attr :string
         
     | 
| 
      
 37 
     | 
    
         
            +
                  #attr :indent
         
     | 
| 
      
 38 
     | 
    
         
            +
                  #attr :front
         
     | 
| 
      
 39 
     | 
    
         
            +
                  #attr :mark
         
     | 
| 
      
 40 
     | 
    
         
            +
                  #attr :pad
         
     | 
| 
      
 41 
     | 
    
         
            +
                  #attr :till
         
     | 
| 
      
 42 
     | 
    
         
            +
                  #attr :count
         
     | 
| 
      
 43 
     | 
    
         
            +
                  #attr :body
         
     | 
| 
      
 44 
     | 
    
         
            +
                  #attr :post
         
     | 
| 
      
 45 
     | 
    
         
            +
             
     | 
| 
      
 46 
     | 
    
         
            +
                  # Initialize a new type match.
         
     | 
| 
      
 47 
     | 
    
         
            +
                  #def initialize(opts)
         
     | 
| 
      
 48 
     | 
    
         
            +
                  #  @line   = opts[:line]
         
     | 
| 
      
 49 
     | 
    
         
            +
                  #  @indent = opts[:indent]
         
     | 
| 
      
 50 
     | 
    
         
            +
                  #  @front  = opts[:front]
         
     | 
| 
      
 51 
     | 
    
         
            +
                  #  @mark   = opts[:mark]
         
     | 
| 
      
 52 
     | 
    
         
            +
                  #  @pad    = opts[:pad]
         
     | 
| 
      
 53 
     | 
    
         
            +
                  #  @till   = opts[:till]
         
     | 
| 
      
 54 
     | 
    
         
            +
                  #  @count  = opts[:count].to_i
         
     | 
| 
      
 55 
     | 
    
         
            +
                  #  @body   = opts[:body].strip
         
     | 
| 
      
 56 
     | 
    
         
            +
                  #  @post   = opts[:post]
         
     | 
| 
      
 57 
     | 
    
         
            +
                  #end
         
     | 
| 
      
 58 
     | 
    
         
            +
             
     | 
| 
      
 59 
     | 
    
         
            +
                  ## Add a tail line.
         
     | 
| 
      
 60 
     | 
    
         
            +
                  #def <<(line)
         
     | 
| 
      
 61 
     | 
    
         
            +
                  #  @tail << line
         
     | 
| 
      
 62 
     | 
    
         
            +
                  #end
         
     | 
| 
      
 63 
     | 
    
         
            +
             
     | 
| 
      
 64 
     | 
    
         
            +
                  #
         
     | 
| 
      
 65 
     | 
    
         
            +
                  #def to_s(result, cnt=nil)
         
     | 
| 
      
 66 
     | 
    
         
            +
                  #  if cnt
         
     | 
| 
      
 67 
     | 
    
         
            +
                  #    mark = marker.sub(/\+\d+/, "+#{cnt}")
         
     | 
| 
      
 68 
     | 
    
         
            +
                  #    "#{indent}#{front}#{mark}#{tail}\n" + result  + "\n" # TODO: there should be no front
         
     | 
| 
      
 69 
     | 
    
         
            +
                  #  elsif carrot?
         
     | 
| 
      
 70 
     | 
    
         
            +
                  #    b = tail.index('^') + 1
         
     | 
| 
      
 71 
     | 
    
         
            +
                  #    e = tail.index(/[<{]/) || - 1
         
     | 
| 
      
 72 
     | 
    
         
            +
                  #    m = tail[b...e]
         
     | 
| 
      
 73 
     | 
    
         
            +
                  #    i = front.index(m)
         
     | 
| 
      
 74 
     | 
    
         
            +
                  #    result = front[0...i] + result.sub('^','')
         
     | 
| 
      
 75 
     | 
    
         
            +
                  #    "#{indent}#{result}#{marker}#{tail}\n"
         
     | 
| 
      
 76 
     | 
    
         
            +
                  #  else
         
     | 
| 
      
 77 
     | 
    
         
            +
                  #    "#{indent}#{result}#{marker}#{tail}\n"
         
     | 
| 
      
 78 
     | 
    
         
            +
                  #  end
         
     | 
| 
      
 79 
     | 
    
         
            +
                  #end
         
     | 
| 
      
 80 
     | 
    
         
            +
             
     | 
| 
      
 81 
     | 
    
         
            +
                  # Is a carrot matcher?
         
     | 
| 
      
 82 
     | 
    
         
            +
                  def self.carrot?(render)
         
     | 
| 
      
 83 
     | 
    
         
            +
                    /^\s*\^/.match(render)
         
     | 
| 
      
 84 
     | 
    
         
            +
                  end
         
     | 
| 
      
 85 
     | 
    
         
            +
             
     | 
| 
      
 86 
     | 
    
         
            +
                end#class Type
         
     | 
| 
      
 87 
     | 
    
         
            +
             
     | 
| 
      
 88 
     | 
    
         
            +
              end#class Inline
         
     | 
| 
      
 89 
     | 
    
         
            +
             
     | 
| 
      
 90 
     | 
    
         
            +
            end#module Till
         
     | 
| 
      
 91 
     | 
    
         
            +
             
     |