marked-conductor 1.0.25 → 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 +16 -0
- data/lib/conductor/filter.rb +4 -4
- data/lib/conductor/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: 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..]
|
@@ -405,7 +405,7 @@ class ::String
|
|
405
405
|
## @return [String] content with headers updated
|
406
406
|
##
|
407
407
|
def normalize_headers
|
408
|
-
gsub(/^(\S.*)\n([=-]+)\n/) do
|
408
|
+
gsub(/^(?<=\n\n)(\S.*)\n([=-]+)\n/) do
|
409
409
|
m = Regexp.last_match
|
410
410
|
case m[2]
|
411
411
|
when /\=/
|
@@ -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
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: marked-conductor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brett Terpstra
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-07-
|
11
|
+
date: 2024-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: awesome_print
|