mdless 0.0.7 → 0.0.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4fcccb4da5a1692b5452b814fd4741b7ab95b2e9
4
- data.tar.gz: 6225634e845e46cfd9bebd9f0726454d379bce6a
3
+ metadata.gz: 8c90942cd09b87938acb76039218272c24cfe259
4
+ data.tar.gz: 910c0cf283c54a502329e867d161635a6ea6b9e6
5
5
  SHA512:
6
- metadata.gz: be0b61b2ef4802e06dc425acd67bc7280207880ffc3b87676631e21f4575023d6c588b3438e6640e7cb633f7b0475520f4d3439d8c5fe56b2e9cba42517474b5
7
- data.tar.gz: 2f1be952a4c5f84a54b1a7cb9170095522363c1cc4e91b2168298c71f4db3c5129d8d90c99086ae5f4b1af77082931cb55c7db945ddef18dd1146f520b3c83e2
6
+ metadata.gz: 9bd405018da73047f82adbf0e1931a05a84baf598cc3cfe68911bb5fb3cbe7c2c41ead289d3c307f38bd3c6daf3de691a40cfcdb3f32e24a4f56eb0a97813fc5
7
+ data.tar.gz: d22e8c3e662d02d5d6f5b7ed2bc44d6aa79d2c04598c90b7ad2844cb8e425cada82c1cdc34f8b295e5b3b9fc6a2fd13ac3dfefc83376754ffcdce56c197da6bc
@@ -236,7 +236,7 @@ module CLIMarkdown
236
236
 
237
237
  table = this_table.join("\n").strip
238
238
  begin
239
- formatted = MDTableFormatter.new(table)
239
+ formatted = MDTableCleanup.new(table)
240
240
  res = formatted.to_md
241
241
  res = color_table(res)
242
242
  rescue
@@ -257,10 +257,6 @@ module CLIMarkdown
257
257
  all_content.join("\n")
258
258
  end
259
259
 
260
- def clean_table(input)
261
-
262
- end
263
-
264
260
  def clean_markers(input)
265
261
  input.gsub!(/^(\e\[[\d;]+m)?[%~] ?/,'\1')
266
262
  input
@@ -590,7 +586,8 @@ module CLIMarkdown
590
586
  end
591
587
 
592
588
  # list items
593
- line.gsub!(/^(\s*)([*\-+]|\d\.) /) do |m|
589
+ # TODO: Fix ordered list numbering, pad numbers based on total number of list items
590
+ line.gsub!(/^(\s*)([*\-+]|\d+\.) /) do |m|
594
591
  match = Regexp.last_match
595
592
  last = find_color(match.pre_match)
596
593
  indent = match[1] || ''
data/lib/mdless/tables.rb CHANGED
@@ -1,17 +1,16 @@
1
1
  module CLIMarkdown
2
- class MDTableFormatter
2
+ class MDTableCleanup
3
3
 
4
- def initialize(string)
5
- @doc = string
4
+ def initialize(input)
5
+ @string = input
6
6
  @format_row = []
7
- parse
8
7
  end
9
8
 
10
9
  def parse
11
10
  @table = []
12
11
  format = []
13
12
  cols = 0
14
- rows = @doc.split(/\r?\n/)
13
+ rows = @string.split(/\r?\n/)
15
14
  rows.each do |row|
16
15
  row.strip!
17
16
  row.sub!(/^\s*\|?/,'').sub!(/\|?\s*$/,'')
@@ -1,3 +1,3 @@
1
1
  module CLIMarkdown
2
- VERSION = '0.0.7'
2
+ VERSION = '0.0.8'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mdless
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra