Class: ReVIEW::Retrovert::ReViewDef
- Inherits:
-
Object
- Object
- ReVIEW::Retrovert::ReViewDef
- Defined in:
- lib/review/retrovert/reviewdef.rb
Class Attribute Summary collapse
-
.r_option_inner ⇒ Object
Returns the value of attribute r_option_inner.
Class Method Summary collapse
- .fence_close(open) ⇒ Object
-
.get_caption(line) ⇒ Object
キャプションを取得する.
-
.id_ref_inline_commands ⇒ Object
id 参照するインラインコマンド.
- .is_has_id_block_command(cmd) ⇒ Object
-
.no_id_block_command ⇒ Object
id 指定しないブロックコマンド.
- .review_jsbook_invalid_configs ⇒ Object
Class Attribute Details
.r_option_inner ⇒ Object
Returns the value of attribute r_option_inner.
5 6 7 |
# File 'lib/review/retrovert/reviewdef.rb', line 5 def r_option_inner @r_option_inner end |
Class Method Details
.fence_close(open) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/review/retrovert/reviewdef.rb', line 11 def fence_close(open) case open when "$", "|" then return open when "{" then return "}" end nil end |
.get_caption(line) ⇒ Object
キャプションを取得する
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/review/retrovert/reviewdef.rb', line 77 def (line) m = line.match(/^\/\/(\w+?)((\[#{r_option_inner}\])*)([$|{])*$/) if m cmd = m[1] = m[2] if if no_id_block_command().include?(cmd) n = .match(/\[(#{r_option_inner})\].*/) return n[1] if n else n = .match(/\[#{r_option_inner}\]\[(#{@r_option_inner})\].*/) return n[1] if n end end end nil end |
.id_ref_inline_commands ⇒ Object
id 参照するインラインコマンド
38 39 40 41 42 43 44 45 |
# File 'lib/review/retrovert/reviewdef.rb', line 38 def id_ref_inline_commands() [ "list", "img", "table", "eq", ] end |
.is_has_id_block_command(cmd) ⇒ Object
7 8 9 |
# File 'lib/review/retrovert/reviewdef.rb', line 7 def is_has_id_block_command(cmd) no_id_block_command().none?(cmd) end |
.no_id_block_command ⇒ Object
id 指定しないブロックコマンド
22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/review/retrovert/reviewdef.rb', line 22 def no_id_block_command() [ "emlist", "emlistnum", "emtable", "note", "memo", "info", "warning", "important", "caution", "notice", ] end |
.review_jsbook_invalid_configs ⇒ Object
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/review/retrovert/reviewdef.rb', line 47 def review_jsbook_invalid_configs() [ "uplatex", "autodetect-engine", "papersize", "titlepage", "notitlepage", "usemag", "nomag", "nomag*", "a4j", "a5j", "b4j", "b5j", "winjis", "mingoth", "jis", "disablejfam", "a4paper", "a5paper", "b4paper", "b5paper", "letterpaper", "tombo", "tombow", "mentuke", ] end |