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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 295ea4bad4cbe143c6a83632c8b745baa893ad40de1f310f1b42d25108d1e09e
4
- data.tar.gz: a0251ebf5f4626f764fe588a09a1f1b865941945850064ae46cdde02f8f694db
3
+ metadata.gz: 04afed7a81d07d1789a115c7c31e4d09df1c638eaf2eacf390f7ec7611e522ef
4
+ data.tar.gz: 403f2c7cb9381b4ee12859b27f9fc584ce73274ced9254a7b08b5cda4b316849
5
5
  SHA512:
6
- metadata.gz: 52a8f6612cd84debb4d47069a0412446b8cff83411931890ed7e60c00dbb4f1dfe0b56ccf1a439683f612879b50f57aca28ee253789d824127f7b00c4b050f58
7
- data.tar.gz: 5eec4d032bca113e06f6fe3a4cdbc4fbffe508bcf09c23b6ac67ff9dfeed61eeab5a9568b307caa5fac8c8dac61823151d426d5843d357cf0b58ba590c2ad5ef
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] == '')
@@ -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 s[0] == '|' # check if table
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
- if res = /^[|]\s?(:?)(-{3,})(:?)\s?[|]/.match(s) # check if it is a separator first
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.7
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-08-30 00:00:00.000000000 Z
11
+ date: 2024-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor