mdextab 0.1.7 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/main.yml +29 -0
- data/.gitignore +6 -0
- data/.rubocop.yml +7 -142
- data/.rubocop_todo.yml +270 -20
- data/Gemfile +22 -2
- data/Gemfile.lock +98 -0
- data/Rakefile +27 -4
- data/bin/makemdtab +25 -25
- data/bin/mdextab +1 -1
- data/lib/mdextab/layer.rb +12 -13
- data/lib/mdextab/makemdtab.rb +29 -32
- data/lib/mdextab/table.rb +13 -13
- data/lib/mdextab/tbody.rb +1 -1
- data/lib/mdextab/td.rb +4 -4
- data/lib/mdextab/th.rb +2 -2
- data/lib/mdextab/token.rb +6 -19
- data/lib/mdextab/tr.rb +1 -1
- data/lib/mdextab/version.rb +1 -1
- data/lib/mdextab.rb +31 -34
- data/mdextab.gemspec +21 -16
- metadata +77 -32
data/bin/makemdtab
CHANGED
@@ -14,30 +14,30 @@ if ARGV.empty?
|
|
14
14
|
end
|
15
15
|
|
16
16
|
Simpleoptparse::Simpleoptparse.parse(ARGV, opts, banner, Mdextab::VERSION, nil) do |parser|
|
17
|
-
parser.on("--debug") {|_x| opts["debug"] = true }
|
18
|
-
parser.on("--verbose") {|_x| opts["verbose"] = true }
|
19
|
-
parser.on("--es path") {|x| opts["fnameStatic"] = x }
|
20
|
-
parser.on("--ev path") {|x| opts["fnameVariable"] = x }
|
21
|
-
parser.on("-t path", "--template") {|x| opts["template"] = opts["t"] = x }
|
22
|
-
parser.on("-y path", "--yaml") {|x| opts["yaml"] = opts["y"] = x }
|
23
|
-
parser.on("-o path", "--output") {|x| opts["output"] = opts["o"] = x }
|
24
|
-
parser.on("-d path", "--data") {|x| opts["data"] = opts["d"] = x }
|
17
|
+
parser.on("--debug") { |_x| opts["debug"] = true }
|
18
|
+
parser.on("--verbose") { |_x| opts["verbose"] = true }
|
19
|
+
parser.on("--es path") { |x| opts["fnameStatic"] = x }
|
20
|
+
parser.on("--ev path") { |x| opts["fnameVariable"] = x }
|
21
|
+
parser.on("-t path", "--template") { |x| opts["template"] = opts["t"] = x }
|
22
|
+
parser.on("-y path", "--yaml") { |x| opts["yaml"] = opts["y"] = x }
|
23
|
+
parser.on("-o path", "--output") { |x| opts["output"] = opts["o"] = x }
|
24
|
+
parser.on("-d path", "--data") { |x| opts["data"] = opts["d"] = x }
|
25
25
|
parser.on("--dataop op") do |x|
|
26
|
-
if /^f/.match?(x.downcase)
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
26
|
+
opts["dataop"] = if /^f/.match?(x.downcase)
|
27
|
+
:FILE_INCLUDE
|
28
|
+
else
|
29
|
+
:YAML_TO_MD
|
30
|
+
end
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
34
|
-
if opts["debug"]
|
35
|
-
|
36
|
-
elsif opts["verbose"]
|
37
|
-
|
38
|
-
else
|
39
|
-
|
40
|
-
end
|
34
|
+
mes = if opts["debug"]
|
35
|
+
Messagex::Messagex.new("EXIT_CODE_NORMAL_EXIT", 0, :debug)
|
36
|
+
elsif opts["verbose"]
|
37
|
+
Messagex::Messagex.new("EXIT_CODE_NORMAL_EXIT", 0, :verbose)
|
38
|
+
else
|
39
|
+
Messagex::Messagex.new("EXIT_CODE_NORMAL_EXIT", 0)
|
40
|
+
end
|
41
41
|
|
42
42
|
unless opts["data"]
|
43
43
|
puts("Not specified -data")
|
@@ -55,11 +55,11 @@ opts["data"] = File.expand_path(opts["data"])
|
|
55
55
|
opts["output"] = File.expand_path(opts["output"])
|
56
56
|
opts["yaml"] = File.expand_path(opts["yaml"]) if opts["yaml"]
|
57
57
|
|
58
|
-
if opts["yaml"]
|
59
|
-
|
60
|
-
else
|
61
|
-
|
62
|
-
end
|
58
|
+
auxhs = if opts["yaml"]
|
59
|
+
Filex::Filex.checkAndLoadYamlfile(opts["yaml"], mes)
|
60
|
+
else
|
61
|
+
{}
|
62
|
+
end
|
63
63
|
|
64
64
|
x.makeMd2(opts["template"], auxhs)
|
65
65
|
x.postProcess
|
data/bin/mdextab
CHANGED
@@ -9,7 +9,7 @@ opts = {}
|
|
9
9
|
banner = "Usage: bundle exec ruby bin/mdextab in_md_fname out_md_fname settng_yaml auxiliary_setting_yaml"
|
10
10
|
|
11
11
|
Simpleoptparse::Simpleoptparse.parse(ARGV, opts, banner, Mdextab::VERSION, nil) do |parser|
|
12
|
-
parser.on("-d", "--debug") {|_x| opts["debug"] = true }
|
12
|
+
parser.on("-d", "--debug") { |_x| opts["debug"] = true }
|
13
13
|
end
|
14
14
|
|
15
15
|
fname = ARGV[0]
|
data/lib/mdextab/layer.rb
CHANGED
@@ -40,6 +40,7 @@ module Mdextab
|
|
40
40
|
# @return [Symbol] 現在の状態
|
41
41
|
def cur_state
|
42
42
|
raise if @cur_layer.cur_state.class != Symbol
|
43
|
+
|
43
44
|
@cur_layer.cur_state
|
44
45
|
end
|
45
46
|
|
@@ -50,9 +51,9 @@ module Mdextab
|
|
50
51
|
@cur_layer.table = val
|
51
52
|
end
|
52
53
|
|
53
|
-
# @overload tablee
|
54
|
+
# @overload tablee
|
54
55
|
# カレントレイヤーのtableを取得
|
55
|
-
# @
|
56
|
+
# @return [Table] カレントレイヤーのtable
|
56
57
|
def table
|
57
58
|
@cur_layer.table
|
58
59
|
end
|
@@ -83,11 +84,11 @@ module Mdextab
|
|
83
84
|
@size = @layers.size
|
84
85
|
# raise if state.class != Symbol
|
85
86
|
new_layer.cur_state = state
|
86
|
-
if @cur_layer
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
87
|
+
new_layer.star = if @cur_layer
|
88
|
+
@cur_layer.star
|
89
|
+
else
|
90
|
+
false
|
91
|
+
end
|
91
92
|
@cur_layer = new_layer
|
92
93
|
end
|
93
94
|
|
@@ -123,9 +124,7 @@ module Mdextab
|
|
123
124
|
# @return [void]
|
124
125
|
def process_nested_table_start(token, lineno, fname)
|
125
126
|
# TBODYトークンが出現する前にTABLE_STARTトークンが出現した場合、仮想的なTBODYトークンが出現したとみなす
|
126
|
-
if table.tbody.nil?
|
127
|
-
table.add_tbody(lineno)
|
128
|
-
end
|
127
|
+
table.add_tbody(lineno) if table.tbody.nil?
|
129
128
|
@mes.output_debug("B process_nested_table_start 1 @cur_layer.table=#{@cur_layer.table.object_id} token.kind=#{token.kind} token.opt[:lineno]=#{token.opt[:lineno]} cur_state=#{@cur_layer.cur_state}")
|
130
129
|
# 新しいレイヤーを追加して、それをカレントレイヤーとし、カレントレイヤーにTableを追加する
|
131
130
|
add_layer(fname, lineno, :OUT_OF_TABLE)
|
@@ -199,7 +198,7 @@ module Mdextab
|
|
199
198
|
if @layers.size > 1
|
200
199
|
@mes.output_fatal("illeagal nested env after parsing|:OUT_OF_TABLE")
|
201
200
|
@mes.output_fatal("@layers.size=#{@layers.size} :TABLE_START #{fname} #{table.lineno}")
|
202
|
-
@layers.map {|x| @mes.output_debug("== @layers.cur_state=#{x.cur_state} :TABLE_START #{fname} #{x.table.lineno}") }
|
201
|
+
@layers.map { |x| @mes.output_debug("== @layers.cur_state=#{x.cur_state} :TABLE_START #{fname} #{x.table.lineno}") }
|
203
202
|
@mes.output_debug("== table")
|
204
203
|
@mes.output_info(table)
|
205
204
|
exit(@mes.ec("EXIT_CODE_EXCEPTION"))
|
@@ -208,7 +207,7 @@ module Mdextab
|
|
208
207
|
if @layers.size > 1
|
209
208
|
@mes.output_fatal("illeagal nested env after parsing|:START")
|
210
209
|
@mes.output_fatal("@layers.size=#{@layers.size}")
|
211
|
-
@layers.map {|x| @mes.output_error("== @layers.cur_state=#{x.cur_state} :TABLE_START #{fname} #{x.table.lineno}") }
|
210
|
+
@layers.map { |x| @mes.output_error("== @layers.cur_state=#{x.cur_state} :TABLE_START #{fname} #{x.table.lineno}") }
|
212
211
|
@mes.output_error("== table")
|
213
212
|
@mes.output_error(table)
|
214
213
|
exit(@mes.ec("EXIT_CODE_EXCEPTION"))
|
@@ -217,7 +216,7 @@ module Mdextab
|
|
217
216
|
@mes.output_fatal("illeagal state after parsing(@cur_layer.cur_state=#{@cur_layer.cur_state}|fname=#{fname}")
|
218
217
|
@mes.output_fatal("@layers.size=#{@layers.size}")
|
219
218
|
@mes.output_error("== cur_state=#{@cur_layer.cur_state}")
|
220
|
-
@layers.map {|x| @mes.output_error("== @layers.cur_state=#{x.cur_state} #{fname}:#{x.table.lineno}") }
|
219
|
+
@layers.map { |x| @mes.output_error("== @layers.cur_state=#{x.cur_state} #{fname}:#{x.table.lineno}") }
|
221
220
|
@mes.output_error("")
|
222
221
|
exit(@mes.ec("EXIT_CODE_ILLEAG<AL_STATE"))
|
223
222
|
end
|
data/lib/mdextab/makemdtab.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# テーブル拡張Markdownモジュール
|
1
2
|
module Mdextab
|
2
3
|
require "digest"
|
3
4
|
require "pp"
|
@@ -9,8 +10,8 @@ module Mdextab
|
|
9
10
|
#
|
10
11
|
# 初期化
|
11
12
|
#
|
12
|
-
# @param
|
13
|
-
# @option
|
13
|
+
# @param opts [Hash] オプション
|
14
|
+
# @option opts [Symbol] :debug Messagexクラスのインスタンスに与えるデバッグモード
|
14
15
|
# @param eruby_variable_str [String] 2回の置き換えが必要なeRubyスクリプト
|
15
16
|
# @param eruby_static_str [String] 1回の置き換えが必要なeRubyスクリプト
|
16
17
|
# @param obj_by_yaml [Hash] eRubyスクリプト向け置換用ハッシュ
|
@@ -24,15 +25,13 @@ module Mdextab
|
|
24
25
|
@obj_by_yaml = obj_by_yaml
|
25
26
|
|
26
27
|
@mes = mes
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
end
|
35
|
-
end
|
28
|
+
@mes ||= if opts[:debug]
|
29
|
+
Messagex::Messagex.new("EXIT_CODE_NORMAL_EXIT", 0, :debug)
|
30
|
+
elsif opts[:verbose]
|
31
|
+
Messagex::Messagex.new("EXIT_CODE_NORMAL_EXIT", 0, :verbose)
|
32
|
+
else
|
33
|
+
Messagex::Messagex.new("EXIT_CODE_NORMAL_EXIT", 0)
|
34
|
+
end
|
36
35
|
@mes.add_exitcode("EXIT_CODE_ILLEGAL_DATAOP")
|
37
36
|
Filex::Filex.setup(@mes)
|
38
37
|
|
@@ -42,14 +41,14 @@ module Mdextab
|
|
42
41
|
#
|
43
42
|
# ファイルから生成(使われていない?)
|
44
43
|
#
|
45
|
-
# @param
|
46
|
-
# @option
|
47
|
-
# @option
|
48
|
-
# @param
|
49
|
-
# @param
|
44
|
+
# @param opts [Hash] オプション
|
45
|
+
# @option opts [String] :debug Messagexクラスのインスタンスに与えるデバッグモード
|
46
|
+
# @option opts [IO] :output 出力先IO
|
47
|
+
# @param fname_variable [String] 2回の置き換えが必要なeRubyスクリプトファイル名
|
48
|
+
# @param fname_static [String] 1回の置き換えが必要なeRubyスクリプトファイル名
|
50
49
|
# @param root_settingfile [String] eRubyスクリプト向け置換用YAML形式ファイル名
|
51
50
|
# @param mes [Messagex] Messagexクラスのインスタンス
|
52
|
-
# @
|
51
|
+
# @return [Makemdtab]
|
53
52
|
def self.create(opts, fname_variable, fname_static, root_settingfile, mes)
|
54
53
|
Filex::Filex.setup(mes)
|
55
54
|
|
@@ -71,7 +70,7 @@ module Mdextab
|
|
71
70
|
# @param root_dir [String] ルートディレクト(templatefileが示す相対パスの起点)
|
72
71
|
# @param templatefile [String,nil] テーブル拡張Makrdown形式の変換元YAML形式ファイルへの相対パス
|
73
72
|
# @param auxhs [Hash] eRubyスクリプト向け置換用ハッシュ(@obj_by_yamlにマージする)
|
74
|
-
# @
|
73
|
+
# @return [void]
|
75
74
|
def make_md2(root_dir, templatefile=nil, auxhs={})
|
76
75
|
# 補助的な置換用ハッシュを@obj_by_yamlにマージする
|
77
76
|
objx = @obj_by_yaml.merge(auxhs)
|
@@ -93,7 +92,7 @@ module Mdextab
|
|
93
92
|
else
|
94
93
|
array = []
|
95
94
|
end
|
96
|
-
array.map {|x| @mes.exc_file_write(@outputfname) { @output.puts(x) } }
|
95
|
+
array.map { |x| @mes.exc_file_write(@outputfname) { @output.puts(x) } }
|
97
96
|
end
|
98
97
|
|
99
98
|
#
|
@@ -102,23 +101,23 @@ module Mdextab
|
|
102
101
|
# @param root_dir [String] ルートディレクト(eruby_fnameが示す相対パスの起点)
|
103
102
|
# @param eruby_fname [String] fileReadメソッド呼び出しを含むeRubyスクリプトファイル名
|
104
103
|
# @param objx [Hash] eRubyスクリプト向け置換用ハッシュ
|
105
|
-
# @
|
104
|
+
# @return [Array<String>] 指定ファイルを取り込んで展開した結果の文字列の配列(ただし要素は1個のみ)
|
106
105
|
def load_file_include(root_dir, eruby_fname, objx)
|
107
106
|
# eruby_fnameはfileReadメソッド呼び出しを含むeRubyスクリプトファイル
|
108
107
|
# fileReadメソッドは、引数を読み込むべきファイルへのパスに変換して、ファイルを読み込む
|
109
108
|
|
110
109
|
# fileReadメソッドで参照するparentDirという変数に、root_dirの値を割り当てる
|
111
|
-
objy = { "parentDir" => "%q
|
110
|
+
objy = { "parentDir" => "%q!#{root_dir}!" }
|
112
111
|
# @eruby_variable_strにfileReadメソッドの定義が含まれる
|
113
112
|
eruby_exanpded_str = ""
|
114
113
|
if @eruby_variable_str
|
115
|
-
if @eruby_variable_str.empty?
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
114
|
+
eruby_exanpded_str = if @eruby_variable_str.empty?
|
115
|
+
""
|
116
|
+
else
|
117
|
+
# 変数parent_dirをobjyで定義された値に置換て、fileReadメソッドの定義を完成させる
|
118
|
+
# 置換して得られた文字列を、もう一度eRubyスクリプトにする
|
119
|
+
["<% ", Filex::Filex.expand_str(@eruby_variable_str, objy, @mes), " %>"].join("\n")
|
120
|
+
end
|
122
121
|
end
|
123
122
|
# fileReadメソッド呼び出しを含むeRubyスクリプトファイルを読み込む
|
124
123
|
mbstr = Filex::Filex.check_and_load_file(eruby_fname, @mes)
|
@@ -141,7 +140,7 @@ module Mdextab
|
|
141
140
|
# @param datayamlfname [String] eRubyスクリプトファイルでもあるYAML形式ファイル
|
142
141
|
# @param templatefile [String] YAML形式をテーブル拡張Markdwon形式に変換するeRubyスクリプトファイル
|
143
142
|
# @param objx [Hash] eRubyスクリプト向け置換用ハッシュ
|
144
|
-
# @
|
143
|
+
# @return [Array<String>] 変換されたテーブル拡張Markdwon形式の文字列の配列(ただし要素は1個のみ)
|
145
144
|
def load_yaml_to_md(datayamlfname, templatefile, objx)
|
146
145
|
@mes.output_debug("datayamlfname=#{datayamlfname}")
|
147
146
|
@mes.output_debug("objx=#{objx}")
|
@@ -159,9 +158,7 @@ module Mdextab
|
|
159
158
|
@mes.output_debug("dx=#{dx}")
|
160
159
|
# eRubyスクリプトにdatayamlfnameの内容を置換用ハッシュとして適用して、テーブル拡張Markdown形式に変換する
|
161
160
|
# Filex::Filex.expand_strに渡すハッシュは、エラーメッセージに用いるためのものであり、eRubyスクリプトとは無関係である
|
162
|
-
|
163
|
-
|
164
|
-
array
|
161
|
+
[Filex::Filex.expand_str(dx, objy, @mes, { "datayamlfname" => datayamlfname, "templatefile" => templatefile })]
|
165
162
|
end
|
166
163
|
|
167
164
|
#
|
data/lib/mdextab/table.rb
CHANGED
@@ -32,7 +32,7 @@ module Mdextab
|
|
32
32
|
#
|
33
33
|
# @param lineno [Integer] TABLE_STARTトークンの出現行の行番号
|
34
34
|
# @param mes [Messagex] Messagexクラスのインスタンス
|
35
|
-
# @param
|
35
|
+
# @param attr [String] TABLE_STARTトークンの属性
|
36
36
|
def initialize(lineno, mes, attr=nil)
|
37
37
|
@lineno = lineno
|
38
38
|
@attr = attr
|
@@ -70,18 +70,18 @@ module Mdextab
|
|
70
70
|
#
|
71
71
|
# @param debug [Symbol] デバッグ用フラグ true: デバッグ情報を付加する false: デバッグ情報を付加しない
|
72
72
|
# @return [String] HTMLのTABLEタグとして文字列化したもの
|
73
|
-
def to_s(debug
|
74
|
-
if @attr
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
73
|
+
def to_s(debug: false)
|
74
|
+
str = if @attr
|
75
|
+
if debug
|
76
|
+
%(<table #{@attr} lineno:#{@lineno}>)
|
77
|
+
else
|
78
|
+
%(<table #{@attr}>)
|
79
|
+
end
|
80
|
+
elsif debug
|
81
|
+
%(<table lineno:#{@lineno}>)
|
82
|
+
else
|
83
|
+
%(<table>)
|
84
|
+
end
|
85
85
|
|
86
86
|
[str, @tbody.to_s, "</table>"].join("\n")
|
87
87
|
end
|
data/lib/mdextab/tbody.rb
CHANGED
data/lib/mdextab/td.rb
CHANGED
@@ -19,8 +19,8 @@ module Mdextab
|
|
19
19
|
# @param content [String] TDトークンのコンテンツ
|
20
20
|
# @param condense [Boolean] 文字列化方法 true:改行を含めない false:改行を含める
|
21
21
|
# @return [void]
|
22
|
-
def add(content,
|
23
|
-
if
|
22
|
+
def add(content, condense)
|
23
|
+
if condense
|
24
24
|
if @content
|
25
25
|
if @contnet.match?(/^\s*$/)
|
26
26
|
@content = content.to_s
|
@@ -41,9 +41,9 @@ module Mdextab
|
|
41
41
|
# @return [String] HTMLのTDタグとして文字列化したもの
|
42
42
|
def to_s
|
43
43
|
if @attr.nil?
|
44
|
-
%
|
44
|
+
%(<td>#{@content}</td>)
|
45
45
|
else
|
46
|
-
%
|
46
|
+
%(<td #{@attr}>#{@content}</td>)
|
47
47
|
end
|
48
48
|
end
|
49
49
|
end
|
data/lib/mdextab/th.rb
CHANGED
data/lib/mdextab/token.rb
CHANGED
@@ -40,13 +40,10 @@ module Mdextab
|
|
40
40
|
# @note TABLE_STARTトークンが存在するかもしれないと判断されたときに呼ばれる
|
41
41
|
def get_token_table_start(line, lineno)
|
42
42
|
if /^\s*<table>\s*$/.match?(line)
|
43
|
-
|
43
|
+
create_token(:TABLE_START, { lineno: lineno })
|
44
44
|
elsif (m = /^\s*<table\s+(.+)>\s*$/.match(line))
|
45
|
-
|
46
|
-
else
|
47
|
-
ret = nil
|
45
|
+
create_token(:TABLE_START, { attr: m[1], lineno: lineno })
|
48
46
|
end
|
49
|
-
ret
|
50
47
|
end
|
51
48
|
|
52
49
|
#
|
@@ -57,12 +54,7 @@ module Mdextab
|
|
57
54
|
# @return [Struct,nil] 生成されたトークンまたはnil(トークンが存在しない場合)
|
58
55
|
# @note TBODY_STARTトークンが存在するかもしれないと判断されたときに呼ばれる
|
59
56
|
def get_token_tbody_start(line, lineno)
|
60
|
-
if /^\s*<tbody>\s*$/.match?(line)
|
61
|
-
ret = create_token(:TBODY_START, { lineno: lineno })
|
62
|
-
else
|
63
|
-
ret = nil
|
64
|
-
end
|
65
|
-
ret
|
57
|
+
(create_token(:TBODY_START, { lineno: lineno }) if /^\s*<tbody>\s*$/.match?(line))
|
66
58
|
end
|
67
59
|
|
68
60
|
#
|
@@ -74,7 +66,7 @@ module Mdextab
|
|
74
66
|
# @param cont [String] 現在行の中の:の並びを区切り文字列とした場合の右側の部分
|
75
67
|
# @return [Struct,nil] 生成されたトークンまたはnil(トークンが存在しない場合)
|
76
68
|
# @note 先頭が:のときに呼ばれる
|
77
|
-
def get_token_colon_start(
|
69
|
+
def get_token_colon_start(_line, lineno, nth, cont)
|
78
70
|
if (m = /^th(.*)/.match(cont))
|
79
71
|
cont2 = m[1]
|
80
72
|
if (m2 = /^\s(.*)/.match(cont2))
|
@@ -112,12 +104,7 @@ module Mdextab
|
|
112
104
|
# @return [Struct,nil] 生成されたトークンまたはnil(トークンが存在しない場合)
|
113
105
|
# @note TABLE_ENDトークンが存在するかもしれないと判断されたときに呼ばれる
|
114
106
|
def get_token_table_end(line, lineno)
|
115
|
-
if %r{^\s*</table>\s*$}.match?(line)
|
116
|
-
ret = create_token(:TABLE_END, { lineno: lineno })
|
117
|
-
else
|
118
|
-
ret = nil
|
119
|
-
end
|
120
|
-
ret
|
107
|
+
(create_token(:TABLE_END, { lineno: lineno }) if %r{^\s*</table>\s*$}.match?(line))
|
121
108
|
end
|
122
109
|
|
123
110
|
#
|
@@ -138,7 +125,7 @@ module Mdextab
|
|
138
125
|
ret = get_token_table_start(line, lineno)
|
139
126
|
when /^\s*<tbody/
|
140
127
|
ret = get_token_tbody_start(line, lineno)
|
141
|
-
when /^\s*(
|
128
|
+
when /^\s*(:+)(.*)$/
|
142
129
|
nth = Regexp.last_match(1).size
|
143
130
|
cont = Regexp.last_match(2)
|
144
131
|
ret = get_token_colon_start(line, lineno, nth, cont)
|
data/lib/mdextab/tr.rb
CHANGED
data/lib/mdextab/version.rb
CHANGED