xan_markup 0.4.0 → 0.4.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 +4 -4
- data/VERSION +1 -1
- data/lib/xan_markup/markupizer.rb +1 -1
- data/spec/xan_markup/helper_spec.rb +4 -1
- data/xan_markup.gemspec +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 77755d349d5581f2f7aa5dbed845f375ff257a43
|
4
|
+
data.tar.gz: 2475b3aa316538d584c757c9bfd065a65d8b8d32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bfd098bddb87713528bafdec93ee1949561b280ec50929ed8e04781184792b8a1e898c9f9745246e4c6238e9af0a706aa3b08ce2009318d5c539ad54d2d385d7
|
7
|
+
data.tar.gz: 9b3d58708b92c5056c45e68b5460c7ac4d708606bf6063eb0d0b8c4b4413745389cea489efbf51dd32d2c32e0f7a40475960c52540edfc20d9ddd0799582e1b7
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.1
|
@@ -4,7 +4,7 @@ require 'xan_markup/content_tag'
|
|
4
4
|
module XanMarkup
|
5
5
|
class Markupizer
|
6
6
|
MarkupSyntax = /\{\{ ?(.*?) ?\}\}/
|
7
|
-
BlockMarkupSyntax = /\{\{ ?((\w+)(.*?)) ?\}\}(.*?)\{\{ ?\/(\2) ?\}\}/
|
7
|
+
BlockMarkupSyntax = /\{\{ ?((\w+)(.*?)) ?\}\}(.*?)\{\{ ?\/(\2) ?\}\}/m
|
8
8
|
|
9
9
|
def initialize(content, syntax = MarkupSyntax, block_syntax = BlockMarkupSyntax)
|
10
10
|
@content = content.to_s.dup.to_str
|
@@ -67,7 +67,10 @@ module XanMarkup
|
|
67
67
|
expect(markupizer.tags.size).to eq(2)
|
68
68
|
end
|
69
69
|
|
70
|
-
|
70
|
+
it "should allow multiline blocks" do
|
71
|
+
markupizer = Markupizer.new("{{test}}\nA{{/test}}")
|
72
|
+
expect(markupizer.markupize {|tag| tag.content }).to eq("\nA")
|
73
|
+
end
|
71
74
|
|
72
75
|
it "should return two tags (whitespaces allowed)" do
|
73
76
|
markupizer = Markupizer.new('this is {{awesome}} markup {{test}}')
|
data/xan_markup.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: xan_markup 0.4.
|
5
|
+
# stub: xan_markup 0.4.1 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "xan_markup".freeze
|
9
|
-
s.version = "0.4.
|
9
|
+
s.version = "0.4.1"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|