Class: ReVIEW::MD2INAOBuilder

Inherits:
MARKDOWNBuilder show all
Defined in:
lib/review/md2inaobuilder.rb

Constant Summary

Constants inherited from Builder

Builder::CAPTION_TITLES

Instance Attribute Summary

Attributes inherited from Builder

#doc_status, #location

Attributes included from Loggable

#logger

Instance Method Summary collapse

Methods inherited from MARKDOWNBuilder

#blank, #captionblock, #comment, #compile_href, #compile_kw, #emlist, #endnote_item, #extname, #flushright, #footnote, #headline, #hr, #image_dummy, #image_ext, #image_image, #indepimage, #inline_b, #inline_br, #inline_code, #inline_comment, #inline_del, #inline_dtp, #inline_em, #inline_endnote, #inline_fn, #inline_hd_chap, #inline_i, #inline_icon, #inline_img, #inline_ins, #inline_strong, #inline_sub, #inline_sup, #inline_tt, #inline_u, #list_body, #listnum_body, #nofunc_text, #noindent, #ol_begin, #ol_end, #ol_item, #pagebreak, #puts, #quote, #table_begin, #table_border, #table_end, #table_header, #table_rows, #td, #th, #tr, #ul_begin, #ul_end, #ul_item_begin, #ul_item_end

Methods included from HTMLUtils

#escape, #escape_comment, #highlight, #highlight?, #highlight_pygments, #highlight_rouge, #normalize_id, #strip_html, #unescape

Methods included from TextUtils

#add_space?, #detab, #join_lines_to_paragraph, #split_paragraph

Methods inherited from Builder

#beginchild, #bibpaper, #bind, #blankline, #caption_top?, #captionblock, #check_nest, #check_nested_minicolumn, #check_printendnotes, #compile_inline, #detab, #embed, #emtable, #endchild, #endnote, #endnote_begin, #endnote_end, #endnote_item, #escape, #extract_chapter_id, #firstlinenum, #get_chap, #graph, #graph_aafigure, #graph_blockdiag, #graph_gnuplot, #graph_graphviz, #graph_mermaid, #graph_plantuml, #handle_metric, #highlight?, #image, #image_ext, #in_minicolumn?, #initialize, #inline_balloon, #inline_bou, #inline_chap, #inline_chapref, #inline_column, #inline_column_chap, #inline_embed, #inline_endnote, #inline_eq, #inline_fn, #inline_hd, #inline_href, #inline_img, #inline_imgref, #inline_include, #inline_kw, #inline_list, #inline_pageref, #inline_raw, #inline_ruby, #inline_sec, #inline_sectitle, #inline_table, #inline_tcy, #inline_title, #inline_w, #inline_wb, #line_num, #list, #listnum, #load_words, #minicolumn_block_name?, #over_secnolevel?, #parse_metric, #parse_table_rows, #post_paragraph, #pre_paragraph, #previous_list_type, #print, #printendnotes, #puts, #raw, #result, #result_metric, #solve_nest, #source, #system_graph, #table, #table_row_separator_regexp, #table_rows, #target_name, #text, #tsize, #ul_item_begin, #ul_item_end

Methods included from Loggable

#app_error, #debug, #error, #error!, #warn

Constructor Details

This class inherits a constructor from ReVIEW::Builder

Instance Method Details

#cmd(lines) ⇒ Object



18
19
20
21
22
23
24
25
# File 'lib/review/md2inaobuilder.rb', line 18

def cmd(lines)
  # WEB+DB では使っていないらしいけど
  puts '!!! cmd'
  lines.each do |line|
    puts detab(line)
  end
  puts ''
end

#compile_ruby(base, ruby) ⇒ Object



43
44
45
46
47
48
49
# File 'lib/review/md2inaobuilder.rb', line 43

def compile_ruby(base, ruby)
  if base.length == 1
    %Q[<span class='monoruby'>#{escape(base)}(#{escape(ruby)})</span>]
  else
    %Q[<span class='groupruby'>#{escape(base)}(#{escape(ruby)})</span>]
  end
end

#dd(lines) ⇒ Object



35
36
37
# File 'lib/review/md2inaobuilder.rb', line 35

def dd(lines)
  puts "<dd>#{join_lines_to_paragraph(lines)}</dd>"
end

#dl_beginObject



27
28
29
# File 'lib/review/md2inaobuilder.rb', line 27

def dl_begin
  puts '<dl>'
end

#dl_endObject



39
40
41
# File 'lib/review/md2inaobuilder.rb', line 39

def dl_end
  puts '</dl>'
end

#dt(line) ⇒ Object



31
32
33
# File 'lib/review/md2inaobuilder.rb', line 31

def dt(line)
  puts "<dt>#{line}</dt>"
end

#list_header(id, caption, _lang) ⇒ Object



14
15
16
# File 'lib/review/md2inaobuilder.rb', line 14

def list_header(id, caption, _lang)
  print %Q(●リスト#{@chapter.list(id).number}::#{compile_inline(caption)}\n\n)
end

#paragraph(lines) ⇒ Object



9
10
11
12
# File 'lib/review/md2inaobuilder.rb', line 9

def paragraph(lines)
  puts ' ' + join_lines_to_paragraph(lines)
  puts "\n"
end