Sha256: 4ffb404fb91d4878d075784dbc5b4a4749af8958853b9b47b558aa713724a9aa
Contents?: true
Size: 882 Bytes
Versions: 57
Compression:
Stored size: 882 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; _puts "# #{@_data}"; _optional_blank_line end # atx style for now def h2; _puts "## #{@_data}"; _optional_blank_line end def h3; _puts "### #{@_data}"; _optional_blank_line end def h4; _puts "#### #{@_data}"; _optional_blank_line end def h5; _puts "##### #{@_data}"; _optional_blank_line end def h6; _puts "###### #{@_data}"; _optional_blank_line end def title h1 end def section h3 end def bq # block quote _body {|line| _puts "> #{line}" } end def list _body {|line| _puts " * #{line}" } end def olist # Doesn't handle paragraphs yet n = 0 _body do |line| n += 1 _puts "#{n}. #{_formatting(line)}" end end alias nlist olist
Version data entries
57 entries across 57 versions & 1 rubygems