Module: W2Tags::Block::Remark
- Defined in:
- lib/w2tags/block/remark.rb
Instance Method Summary collapse
- #empty_skip ⇒ Object
- #line_skip ⇒ Object
- #remark_skip ⇒ Object
-
#remark_skip_initialize ⇒ Object
when command is “-#”, it means that inside these indentation will not include on the result or it become some comment.
Instance Method Details
#empty_skip ⇒ Object
15 16 17 |
# File 'lib/w2tags/block/remark.rb', line 15 def empty_skip @row.strip == '' end |
#line_skip ⇒ Object
19 20 21 22 23 |
# File 'lib/w2tags/block/remark.rb', line 19 def line_skip if /(^[\t ]*)(\\)([^\n]*\n)/ =~ @row #escape for plain text "\- " @row = $1+$3 end end |
#remark_skip ⇒ Object
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/w2tags/block/remark.rb', line 25 def remark_skip if(/(^[\t ]*)(-#)([^\n]*)\n/ =~ @row;@rgx = $~) @rmk = @spc.size #@plt = 99 elsif @rmk !=99 @rmk = 99 if @spc.size <= @rmk && @ron!=0 #p "remrk> #{@rgx[3].strip}" if @dbg[:parse] end @row = '' if @rmk!=99 @rmk!=99 end |
#remark_skip_initialize ⇒ Object
when command is “-#”, it means that inside these indentation will not include on the result or it become some comment. Example: -#
THIS COMMENT
WILL NOT SHOW ON RESULT
11 12 13 |
# File 'lib/w2tags/block/remark.rb', line 11 def remark_skip_initialize @rmk = 99 #remark indentation end |