Almirah 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/almirah/doc_items/markdown_table.rb +1 -1
- data/lib/almirah/doc_parser.rb +5 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04afed7a81d07d1789a115c7c31e4d09df1c638eaf2eacf390f7ec7611e522ef
|
4
|
+
data.tar.gz: 403f2c7cb9381b4ee12859b27f9fc584ce73274ced9254a7b08b5cda4b316849
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3db8f92b780657bc4109b96dc64f19c28249c509ba9a7d8c33b71c37fa6fb821a7a140d32bd955e20a7f49e5401b55d64d8732cccd2c7a5800de494dc05660db
|
7
|
+
data.tar.gz: eeab5aa32a82b0efbe0cc3c3f1e576cd99b9ec1eadd9e5b1e46b7e5616d8c715d8b52640a83e9e14ce47ec443239a477f3cc8488441b356dceda6a88a22e306e
|
@@ -30,7 +30,7 @@ class MarkdownTable < DocItem
|
|
30
30
|
|
31
31
|
columns.each do |c|
|
32
32
|
res = /(:?)(-{3,})(:?)/.match(c)
|
33
|
-
@column_aligns << if res.length == 4
|
33
|
+
@column_aligns << if res && res.length == 4
|
34
34
|
if (res[1] != '') && (res[2] != '') && (res[3] != '')
|
35
35
|
'center'
|
36
36
|
elsif (res[1] != '') && (res[2] != '') && (res[3] == '')
|
data/lib/almirah/doc_parser.rb
CHANGED
@@ -211,7 +211,9 @@ class DocParser # rubocop:disable Metrics/ClassLength,Style/Documentation
|
|
211
211
|
temp_md_list = item
|
212
212
|
end
|
213
213
|
|
214
|
-
elsif
|
214
|
+
elsif /^[+](-*[+])/.match(s) # try to ignore Grid Table borders
|
215
|
+
|
216
|
+
elsif (s[0] == '|') || (s[0] == '+') # check if table
|
215
217
|
|
216
218
|
if doc.title == ''
|
217
219
|
# dummy section if root is not a Document Title (level 0)
|
@@ -227,7 +229,8 @@ class DocParser # rubocop:disable Metrics/ClassLength,Style/Documentation
|
|
227
229
|
temp_md_list = nil
|
228
230
|
end
|
229
231
|
|
230
|
-
|
232
|
+
# check if it is a separator first
|
233
|
+
if /^[|]\s?(:?)(-{3,})(:?)\s?[|]/.match(s) || /^[+]\s?(:?)(={3,})(:?)\s?[+]/.match(s)
|
231
234
|
|
232
235
|
if temp_md_table
|
233
236
|
# separator is found after heading
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: Almirah
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oleksandr Ivanov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|