mdless 2.1.39 → 2.1.41
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mdless/console.rb +6 -5
- 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: f1a73a6f53b1069e90cb3c9760f7ec30fa49c7b0bc6583278d85059cadc6558b
|
4
|
+
data.tar.gz: 934c7ce94e399d4f91bb3c2a6fb53053e3584ff9efba64d83e2e1c2b30430657
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52641ae7aa9bb96488c43df3793eaafd32c21d36e77695ebe5c9aebb085a2b241ffae9a7d1faa1cef40184b3f49e6da0c795ae36176eafe4c24f0339504a1d42
|
7
|
+
data.tar.gz: 44316ff110310cc9f026d6f21782b64f301e7a3cca99d9171fe34dc2ea2725e6731feafeee39d5cbac98ff782ba4e3548ee91810aaa33e5955a8e7fe46e2ee03
|
data/lib/mdless/console.rb
CHANGED
@@ -611,7 +611,7 @@ module Redcarpet
|
|
611
611
|
|
612
612
|
lines = input.split(/\n/)
|
613
613
|
line1 = lines.shift
|
614
|
-
pre = spaces +
|
614
|
+
pre = spaces + " "
|
615
615
|
|
616
616
|
body = lines.map { |l| "#{pre}#{l.rstrip}" }.join("\n")
|
617
617
|
"#{line1}\n#{body}"
|
@@ -659,12 +659,13 @@ module Redcarpet
|
|
659
659
|
def nest_lists(input, indent = 0)
|
660
660
|
input.gsub!(%r{<<list(?<id>\d+)-(?<type>.*?)>>(?<content>.*?)<</list\k<id>>>}m) do
|
661
661
|
m = Regexp.last_match
|
662
|
-
lines = m['content'].split(/\n/)
|
662
|
+
lines = m['content'].strip.split(/\n/)
|
663
|
+
|
663
664
|
list = nest_lists(lines.map do |l|
|
664
665
|
outdent = l.scan(%r{<</list\d+>>}).count
|
665
666
|
indent += l.scan(/<<list\d+-.*?>>/).count
|
666
667
|
indent -= outdent
|
667
|
-
"
|
668
|
+
" #{l}"
|
668
669
|
end.join("\n"), indent)
|
669
670
|
next if list.nil?
|
670
671
|
|
@@ -686,7 +687,7 @@ module Redcarpet
|
|
686
687
|
def fix_items(content, last_indent = 0, levels = [0])
|
687
688
|
content.gsub(%r{^(?<indent> *)<<listitem(?<id>\d+)-(?<type>(?:un)?ordered)>>(?<content>.*?)<</listitem\k<id>>>}m) do
|
688
689
|
m = Regexp.last_match
|
689
|
-
indent =
|
690
|
+
indent = 0
|
690
691
|
if indent == last_indent
|
691
692
|
levels[indent] ||= 0
|
692
693
|
levels[indent] += 1
|
@@ -831,7 +832,7 @@ module Redcarpet
|
|
831
832
|
end
|
832
833
|
|
833
834
|
def fix_image_attributes(input)
|
834
|
-
input.gsub(/^( {0,3}\[.*?\]: *\S+) +([^"].*?)$/, '\1')
|
835
|
+
input.gsub(/^( {0,3}\[[^^].*?\]: *\S+) +([^"].*?)$/, '\1')
|
835
836
|
end
|
836
837
|
|
837
838
|
def preprocess(input)
|
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.41
|
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-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redcarpet
|