Sha256: c8ddeebc33587cb31f791fd2f110ee0903085d059d62d449133707dd9d7cf63f
Contents?: true
Size: 873 Bytes
Versions: 2
Compression:
Stored size: 873 Bytes
Contents
# This file is intended to be used via a Livetext .mixin # or the equivalent. SimpleFormats[:b] = %w[* *] SimpleFormats[:i] = %w[_ _] SimpleFormats[:t] = %w[` `] SimpleFormats[:s] = %w[<strike> </strike>] def h1; _out "# #{@_data}"; _optional_blank_line end # atx style for now def h2; _out "## #{@_data}"; _optional_blank_line end def h3; _out "### #{@_data}"; _optional_blank_line end def h4; _out "#### #{@_data}"; _optional_blank_line end def h5; _out "##### #{@_data}"; _optional_blank_line end def h6; _out "###### #{@_data}"; _optional_blank_line end def title h1 end def section h3 end def bq # block quote _body {|line| _out "> #{line}" } end def list _body {|line| _out " * #{line}" } end def olist # Doesn't handle paragraphs yet n = 0 _body do |line| n += 1 _out "#{n}. #{_formatting(line)}" end end alias nlist olist
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
livetext-0.8.78 | plugin/markdown.rb |
livetext-0.8.77 | plugin/markdown.rb |