Sha256: 645b66abc0890aab8789c445b1a7f0206bd3af409944f5bc3d05b6f82dec33ad

Contents?: true

Size: 650 Bytes

Versions: 22

Compression:

Stored size: 650 Bytes

Contents

# This file is intended to be used via a Livetext .mixin  
# or the equivalent.

def h1; _puts "# #{@_data}"; end       # atx style for now
def h2; _puts "## #{@_data}"; end
def h3; _puts "### #{@_data}"; end
def h4; _puts "#### #{@_data}"; end
def h5; _puts "##### #{@_data}"; end
def h6; _puts "###### #{@_data}"; end

def bq   # block quote
  _body {|line| _puts "> #{line}" }
end

# Asterisks, underscores, and double underscores -- difficult, handle later

def list
  _body {|line| _puts " * #{line}" }
end

alias nlist olist

def olist   # Doesn't handle paragraphs yet
  n = 0
  _body do |line|
    n += 1
    _puts "#{n}. #{line}"
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
livetext-0.7.6 dsl/markdown.rb
livetext-0.7.5 ./dsl/markdown.rb
livetext-0.7.4 ./dsl/markdown.rb
livetext-0.7.3 ./dsl/markdown.rb
livetext-0.7.2 ./dsl/markdown.rb
livetext-0.7.1 ./dsl/markdown.rb
livetext-0.7.0 ./dsl/markdown.rb
livetext-0.6.9 ./dsl/markdown.rb
livetext-0.6.8 ./dsl/markdown.rb
livetext-0.6.7 ./dsl/markdown.rb
livetext-0.6.5 ./dsl/markdown.rb
livetext-0.6.4 ./dsl/markdown.rb
livetext-0.6.3 ./dsl/markdown.rb
livetext-0.6.2 ./dsl/markdown.rb
livetext-0.6.1 ./dsl/markdown.rb
livetext-0.6.0 ./dsl/markdown.rb
livetext-0.5.9 ./dsl/markdown.rb
livetext-0.5.8 ./dsl/markdown.rb
livetext-0.5.7 ./dsl/markdown.rb
livetext-0.5.6 ./lib/markdown.rb