mdless 2.1.11 → 2.1.12
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/CHANGELOG.md +2 -0
- data/lib/mdless/console.rb +7 -6
- data/lib/mdless/version.rb +1 -1
- 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: 3fbc37210004d25b7867c566bcc21bfa174a9e27bf74a1113659bc8809b187e8
|
4
|
+
data.tar.gz: 493d48b6061f21e408b0ae1ff43cdb47027bc07039e3678876a958c62177f42f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9b47996f59764d9324c7f3c63d3bfa62f392b2b71c1e93c4d49bb093af252c6a51baa60ca8d5d43e7d98139bfe9e9c20c868f5a43f136df645514d92deccc6f
|
7
|
+
data.tar.gz: 6327ebca9f23e4e0fa59c0911076d09e12299c3efbfb9c46e096416b3b4fb642a460e90ff52429c739c2ed3f53da1f8f589fe479797058e9160c60427b10d7db
|
data/CHANGELOG.md
CHANGED
data/lib/mdless/console.rb
CHANGED
@@ -602,13 +602,13 @@ module Redcarpet
|
|
602
602
|
def indent_lines(input, spaces)
|
603
603
|
return nil if input.nil?
|
604
604
|
|
605
|
-
indent = spaces.scan(/
|
605
|
+
indent = spaces.scan(/\t/).count
|
606
606
|
|
607
607
|
lines = input.split(/\n/)
|
608
608
|
line1 = lines.shift
|
609
|
-
pre =
|
610
|
-
|
611
|
-
body = lines.map { |l| "#{pre}#{l}" }.join("\n")
|
609
|
+
pre = spaces + (" " * (indent + 1))
|
610
|
+
|
611
|
+
body = lines.map { |l| "#{pre}#{l.rstrip}" }.join("\n")
|
612
612
|
"#{line1}\n#{body}"
|
613
613
|
end
|
614
614
|
|
@@ -648,7 +648,7 @@ module Redcarpet
|
|
648
648
|
end
|
649
649
|
|
650
650
|
def fix_list_spacing(input)
|
651
|
-
input.gsub(/( *\n)+( *)<<listitem/, "\n\\2<<listitem").gsub(
|
651
|
+
input.gsub(/( *\n)+( *)<<listitem/, "\n\\2<<listitem").gsub(/( *\n){2,}/, "\n\n")
|
652
652
|
end
|
653
653
|
|
654
654
|
def nest_lists(input, indent = 0)
|
@@ -695,7 +695,7 @@ module Redcarpet
|
|
695
695
|
end
|
696
696
|
|
697
697
|
content = m['content'] =~/<<listitem/ ? fix_items(m['content'], indent, levels) : m['content']
|
698
|
-
color_list_item(
|
698
|
+
color_list_item(" " * indent, uncolor_grafs(content), m['type'].to_sym, levels[indent])
|
699
699
|
end
|
700
700
|
end
|
701
701
|
|
@@ -1073,6 +1073,7 @@ module Redcarpet
|
|
1073
1073
|
input = reference_links(input) if MDLess.options[:links] == :reference || MDLess.options[:links] == :paragraph
|
1074
1074
|
# lists
|
1075
1075
|
input = fix_lists(input)
|
1076
|
+
puts input
|
1076
1077
|
fix_colors(input)
|
1077
1078
|
end
|
1078
1079
|
end
|
data/lib/mdless/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mdless
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brett Terpstra
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-12-
|
11
|
+
date: 2023-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redcarpet
|