marked-conductor 1.0.25 → 1.0.27

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
  SHA256:
3
- metadata.gz: 7e3337e13a120d7eb20aa92ec78ad7a3078f1a5e7f8bd9311fadd05a281b610a
4
- data.tar.gz: 99054e30ad5709439ea2c607bb7e45ce8e7036070fe43b795363298d097d0b05
3
+ metadata.gz: ab841b7eae48110c76bd6b8b8d86f8f02ddbff220672d80b40e89410c473f9e4
4
+ data.tar.gz: c077fa6c66ebad09df4047fc66f5a28b0202045d530de04dad338b707607ba9a
5
5
  SHA512:
6
- metadata.gz: ca3397b4d1e185ab0800241b9fda780671faa1638d318c0d30441cad65cff4763c673ff48c5aeebecb6776fa646ec0aaed8142fad41fd4063e46804f3f2982eb
7
- data.tar.gz: e1c89d1581859b233f97ca0bc86a887951ee52997e9ef7fab21cd1f3c5b7472c87cf5d876241ffa134781314dbd6e27ec0cd56e55af565839f1145dc0cdc0d5d
6
+ metadata.gz: cfe5a81efc6edf85876b749756fe175c7c6bfe272958c842e19a4f795f8a6339ff4ed32373a339e9921917902d4a589ad5cf3c5bd1f2f8a265c4e2b17326c849
7
+ data.tar.gz: 11344262daf5b09c48c7304267c3294125daa65e3e2f98c1e50dbc809bf6981e538304b7229208e9bd7a06bed67804ab2fb575d8105802243ca7c4d048049f8c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ ### 1.0.27
2
+
3
+ 2024-07-24 13:55
4
+
5
+ #### FIXED
6
+
7
+ - StripMeta bad regex
8
+
9
+ ### 1.0.26
10
+
11
+ 2024-07-24 13:49
12
+
13
+ #### FIXED
14
+
15
+ - Don't recognize YAML closing line as settext header
16
+
1
17
  ### 1.0.25
2
18
 
3
19
  2024-07-22 12:36
@@ -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(/^---.*?(---|...)/m, "")
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.count.positive?
599
+ if @params&.count&.positive?
600
600
  content.delete_meta(@params[0])
601
601
  else
602
602
  content.strip_meta
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Conductor
4
- VERSION = '1.0.25'
4
+ VERSION = '1.0.27'
5
5
  end
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.25
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-22 00:00:00.000000000 Z
11
+ date: 2024-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: awesome_print