bridgetown_markdown_lazylinks 0.1.0 → 0.2.0

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: 4382322aa1d43c7667cffe05b697782a642a69a319efe7c15111efaca773a254
4
- data.tar.gz: 116ebdc3f5d921729f5c0e156443fe519a81c209e45a3c1eff09896f59137e7a
3
+ metadata.gz: f7ac6f490c4be985d2f045a7d3fc7d1c695b6ac4b5f657ab3411effda2a88a61
4
+ data.tar.gz: aa5cf84b4651dd47471798e7357fe6233f859daa42e74e150ee767276529a414
5
5
  SHA512:
6
- metadata.gz: 07244ff15cafaf43d69cd2a9e65fc6685457f5511d8b1a56de8e23b4006d725c2fae610ba84e173af08804d6b748e7e17df35f57a6e5cca0708acdf6af20a231
7
- data.tar.gz: 6e161f5dbe4d77173dfc580deda0170846f1a411523857e3896077bb7285b5362c00b88af0558d1d716e888ff68b960cabfcc8ab16343a8aa087e6a06e5e4fb7
6
+ metadata.gz: cfe0267b5a05db18235d7e5c8abd672c316bae55c4793d936fb1585af2757b150d54c04c9bab08c89e0f57a2683ee5cad25dcedb5a4e880af0e35d2fc7bf3485
7
+ data.tar.gz: f34b5c27b60951b267dbd3c994bdcf27aed13d213552a5777f417c0919e25696b5bfec5095a15fc0efe835de6c0e85b696660fa07c91b4be4aa3f82e5bbc6034
data/CHANGELOG.md CHANGED
@@ -7,9 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.2.0] - 2023-06-17
11
+
12
+ - use of cache API to speed up site generation
13
+
10
14
  ## [0.1.0] - 2023-06-16
11
15
 
12
16
  - First version
13
17
 
14
18
  [Unreleased]: https://github.com/akarzim/bridgetown_markdown_lazylinks/tree/main
15
- [0.1.0]: https://github.com/akarzim/bridgetown_markdown_lazylinks/releases/tag/0.1.0
19
+ [0.1.0]: https://github.com/akarzim/bridgetown_markdown_lazylinks/releases/tag/v0.1.0
20
+ [0.2.0]: https://github.com/akarzim/bridgetown_markdown_lazylinks/releases/tag/v0.2.0
data/README.md CHANGED
@@ -28,7 +28,7 @@ The plugin will allow you to use `*` as link references in your markdown
28
28
  documents where the next `[*]:` href defines the link. For example, you can
29
29
  write something like this:
30
30
 
31
- ```md
31
+ ```markdown
32
32
  This is my text and [this is my link][*]. I'll define
33
33
  the url for that link under the paragraph.
34
34
 
@@ -31,16 +31,22 @@ module BridgetownMarkdownLazylinks
31
31
  end
32
32
 
33
33
  def convert(content)
34
- while content =~ LAZY_LINKS_REGEX
35
- self.counter += 1
36
- content.sub!(LAZY_LINKS_REGEX, "\\k<link>#{counter}\\k<url>#{counter}]:")
37
- end
34
+ cache.getset(content) do
35
+ while content =~ LAZY_LINKS_REGEX
36
+ self.counter += 1
37
+ content.sub!(LAZY_LINKS_REGEX, "\\k<link>#{counter}\\k<url>#{counter}]:")
38
+ end
38
39
 
39
- content
40
+ content
41
+ end
40
42
  end
41
43
 
42
44
  private
43
45
 
44
46
  attr_accessor :counter
47
+
48
+ def cache
49
+ @cache ||= Bridgetown::Cache.new("BridgetownMarkdownLazylinks")
50
+ end
45
51
  end
46
52
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BridgetownMarkdownLazylinks
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bridgetown_markdown_lazylinks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - François Vantomme