reviewed_braai 0.0.7 → 0.0.8
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.
@@ -6,5 +6,12 @@ module ReviewedBraai
|
|
6
6
|
attr ? attr.to_s : "<!-- #{matches.last} -->"
|
7
7
|
end
|
8
8
|
end
|
9
|
+
|
10
|
+
class DefaultRegion < ReviewedBraai::Handlers::Base
|
11
|
+
def perform
|
12
|
+
return nil unless matches[1] == matches[-1]
|
13
|
+
"<!-- #{matches[1]} region -->"
|
14
|
+
end
|
15
|
+
end
|
9
16
|
end
|
10
17
|
end
|
@@ -3,6 +3,7 @@ module ReviewedBraai
|
|
3
3
|
module Default
|
4
4
|
# Overwrite default catch-all route (respects template variables)
|
5
5
|
Braai::Template.map(/({{\s*([\w]+)\s*}})/i, ReviewedBraai::Handlers::Default)
|
6
|
+
Braai::Template.map(/({{\s*([\w]+)\s*}}(.*){{\s*\/([\w]+)\s*}})/mi, ReviewedBraai::Handlers::DefaultRegion)
|
6
7
|
end
|
7
8
|
end
|
8
9
|
end
|