marked-conductor 1.0.26 → 1.0.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/conductor/filter.rb +3 -3
- data/lib/conductor/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab841b7eae48110c76bd6b8b8d86f8f02ddbff220672d80b40e89410c473f9e4
|
4
|
+
data.tar.gz: c077fa6c66ebad09df4047fc66f5a28b0202045d530de04dad338b707607ba9a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cfe5a81efc6edf85876b749756fe175c7c6bfe272958c842e19a4f795f8a6339ff4ed32373a339e9921917902d4a589ad5cf3c5bd1f2f8a265c4e2b17326c849
|
7
|
+
data.tar.gz: 11344262daf5b09c48c7304267c3294125daa65e3e2f98c1e50dbc809bf6981e538304b7229208e9bd7a06bed67804ab2fb575d8105802243ca7c4d048049f8c
|
data/CHANGELOG.md
CHANGED
data/lib/conductor/filter.rb
CHANGED
@@ -47,7 +47,7 @@ class ::String
|
|
47
47
|
lines = split(/\n/)
|
48
48
|
lines.shift
|
49
49
|
lines.each_with_index do |line, idx|
|
50
|
-
next unless line =~ /^(
|
50
|
+
next unless line =~ /^(\.\.\.|---) *$/
|
51
51
|
|
52
52
|
insert_point = idx + 1
|
53
53
|
break
|
@@ -370,7 +370,7 @@ class ::String
|
|
370
370
|
def strip_meta
|
371
371
|
case meta_type
|
372
372
|
when :yaml
|
373
|
-
sub(/^---.*?(
|
373
|
+
sub(/^---.*?(---|\.\.\.)/m, "")
|
374
374
|
when :mmd
|
375
375
|
lines = split(/\n/)
|
376
376
|
lines[meta_insert_point..]
|
@@ -596,7 +596,7 @@ class Filter < String
|
|
596
596
|
# should recognize yaml and mmd
|
597
597
|
content.set_meta(@params[0], @params[1], style: content.meta_type)
|
598
598
|
when /(strip|remove|delete)meta/
|
599
|
-
if @params
|
599
|
+
if @params&.count&.positive?
|
600
600
|
content.delete_meta(@params[0])
|
601
601
|
else
|
602
602
|
content.strip_meta
|
data/lib/conductor/version.rb
CHANGED