obsidian-parser 0.5.0 → 0.5.1

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: 10a282bce512c7d763d89eed0aedff250e6721cad6e0849af3821dd897e8d819
4
- data.tar.gz: d3271c30ab0f7094b6273b0e8f86b33ec2280729fe757958b61459cc0bca5447
3
+ metadata.gz: 900eecebc9fbedf86efa15e1913fcdbf661cab7e6cb19453ecbf5b7d956f95b1
4
+ data.tar.gz: 5bbfdbc5cf83fb3149536b54fb427e44a2d5521ca292d7b97af1345e85fa9779
5
5
  SHA512:
6
- metadata.gz: 69cdd0c2c4c6ceb085c9e861d18be91ce3f6b237445f26720bf1787da8448c7ab459c24b4a717d51d1001c7ab9f09b143cb296d28dfee075a869dad9aed10467
7
- data.tar.gz: 9511deca5d2844548218b5a7841912b89469b036db63ad3c879c0e246453bf527cb37c732fc3df4e22dfcba4ea5f24e53340dc8572ac0c9372146ee14fb95805
6
+ metadata.gz: 9bac7a436c5a2bb2a8568c4ba306d769584813ac5da89f9d3051c601f347c22abe6b6009dc4ca988912dd13af32d2c25e7dc15943a3032a871b3ba656200271d
7
+ data.tar.gz: deba24083f278d7c0b060f798f86de8d95a2a451e899577fbcda4f98046c5d0083554c55d8cfd35eedde085c21fde64cc01d6923d3a8f60aa388f4a412f64183
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.5.1] - 2023-07-30
4
+ - Fix handling of `index.md` at the root level.
5
+
3
6
  ## [0.5.0] - 2023-07-30
4
7
  - Fix ordering of `Page#children` so that index pages come first.
5
8
  - Fix handling of `index.md` documents so that the slug reflects the directory path.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- obsidian-parser (0.5.0)
4
+ obsidian-parser (0.5.1)
5
5
  kramdown (~> 2.4)
6
6
  kramdown-parser-gfm (~> 1.1)
7
7
 
@@ -47,7 +47,11 @@ module Obsidian
47
47
  # are added before their descendents.
48
48
  def add_page(slug, last_modified: nil, content: nil)
49
49
  path_components = slug.split("/")
50
- raise ArgumentError, "Expecting non-empty slug" if path_components.empty?
50
+
51
+ if path_components.empty?
52
+ update_content(content: content, last_modified: last_modified)
53
+ return
54
+ end
51
55
 
52
56
  title = path_components.pop
53
57
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Obsidian
4
4
  class Parser
5
- VERSION = "0.5.0"
5
+ VERSION = "0.5.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: obsidian-parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mat Moore