markdown-expander 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ad8e6ae8e9d89626d4d71590dea763ba74c79242
4
- data.tar.gz: 63b4485ecb6bab86279feb05e3497ae685a34148
3
+ metadata.gz: 08884e0ba6130f82bde17019674c76462d0c02fc
4
+ data.tar.gz: 5fe09c64e9f0962720abf743145a5f557fcb5e5b
5
5
  SHA512:
6
- metadata.gz: 552592cfc4a1a85c1478a1293a911776cc59f4b3c159639c085d7f149edb523a7a13419684ed6e4b572bd1e33c6828009cb4d66d4caea0130c9882d6e6f29bed
7
- data.tar.gz: f2ab6e2b845933e3f58b2541248ff5aae4caaccd456b991d6cde3c915f25ff0f52f7cb17ac9239ece717a0c0379a1d748880aef82d541ee05023c1d56473df2c
6
+ metadata.gz: 9f3f14364a5409cc72d537ae03226a93f9fb3d5331fb2ad00c3a57e9e0512332d8259f4c2f323a75bb5e36023bc275bc30dc5584a5f28bcdfa9cd2699d530a64
7
+ data.tar.gz: 835a848e9853d38de2d80aa3d085dc4feee46b334fe35652b8c85bac537d3c8442cef73d46e81859ee2d4411c342a6ee3a83ded495cc2067c3797849c555ac95
@@ -21,14 +21,19 @@ module MarkdownExpander
21
21
  node = new_node
22
22
  elsif line =~ LOOP_END_MATCH
23
23
  node = node.parent
24
- elsif line =~ EXPRESSION_MATCH
25
- before_match = $`
26
- after_match = $'
27
- node.children << Node.new(node, before_match)
28
- node.children << Node.new(node, Expression.new($1))
29
- node.children << Node.new(node, after_match)
30
24
  else
31
- node.children << Node.new(node, line)
25
+ loop do
26
+ if line =~ EXPRESSION_MATCH
27
+ before_match = $`
28
+ after_match = $'
29
+ node.children << Node.new(node, before_match)
30
+ node.children << Node.new(node, Expression.new($1))
31
+ line = after_match
32
+ else
33
+ node.children << Node.new(node, line)
34
+ break
35
+ end
36
+ end
32
37
  end
33
38
  end
34
39
 
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module MarkdownExpander
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markdown-expander
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Vos