markdown_wikilinks 0.1.1 → 0.2.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: 2466772c3bdd7839aec4c5cc4e3da4486bc95f3a7463458b4c3cd9a737c9ffee
4
- data.tar.gz: cbcb9035e411f7be5b4d287401efbee99b419c5f9e591892471ab5024cf6c692
3
+ metadata.gz: 70c0abdef36b8e62e3ac00f7c7a8af656220a3f5a16d3b3c375ca0f47979878f
4
+ data.tar.gz: c5cd123224ca56146b4c6c76283976122675bb5c6345392881785a93a147b225
5
5
  SHA512:
6
- metadata.gz: 47426591255c439dda05449875cb85d8733b331f243410a7502ef35e6c7343c7668ca9e12bdb7ee28404ce821abcb24c6d5e0f850eafbe58a4c9e79fe1e9c59b
7
- data.tar.gz: 4504e7526f2838fb7ef325d17dbdcf16065846444f8d0d98b05dced2ca8973210b2bfd6efc5943195fd260aebbc5bba99cd48709f00684cc819073646957a846
6
+ metadata.gz: de0bc4ee93a7bbf16e50eccbe21adcd440d8b957bb880e58842b6bf5489107abc03da74d52307ac8e1f72b6e939d545b56574b350f47524eeadf36206dd14262
7
+ data.tar.gz: a4ba2496d1dccf9636a840e93f48ea81358787f04bf7a7918b909cb40d80334c660a42f406ba3c425c09c4acc6555429a4f03c87e95c8cd30b182fba176e1c02
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MarkdownWikilinks
4
- VERSION = "0.1.1"
4
+ VERSION = "0.2.1"
5
5
  end
@@ -5,7 +5,11 @@ require_relative "markdown_wikilinks/version"
5
5
  module Jekyll
6
6
  module MarkdownWikilinks
7
7
  def wikilinks_to_markdown(input)
8
- "aaaa"
8
+ input.gsub(/\[\[([^\]]+?)(\|([^\]]+?))?\]\]/) do
9
+ link_text = $3
10
+ linked_page = $1
11
+ "[#{link_text}](#{linked_page}.md)"
12
+ end
9
13
  end
10
14
  end
11
15
  end
Binary file
Binary file
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markdown_wikilinks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juhana Kaarlehto
@@ -23,6 +23,9 @@ files:
23
23
  - Rakefile
24
24
  - lib/markdown_wikilinks.rb
25
25
  - lib/markdown_wikilinks/version.rb
26
+ - markdown_wikilinks-0.1.0.gem
27
+ - markdown_wikilinks-0.1.1.gem
28
+ - markdown_wikilinks-0.2.0.gem
26
29
  - markdown_wikilinks.gemspec
27
30
  - sig/markdown_wikilinks.rbs
28
31
  homepage: https://github.com/jKaarlehto/dnd