rulex 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -0
- data/examples/count.rex +8 -0
- data/examples/count.tex +5 -1
- data/lib/rulex/rex/reader.rb +2 -2
- data/lib/rulex/version.rb +1 -1
- 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: 6509b0f600b1236371fcd853fe2274722aaab361
|
4
|
+
data.tar.gz: b90f15e2ef9fc81756f53e83ebfdf8eb89f25e32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45cb58fb9b7bcbe2703f454259d11e667e7d0ac5db71c3730ed266275f191ea569cc2243a40ccbf46f096127dd5a18d8f33adfce75ffc0f8e0601b6b10379b32
|
7
|
+
data.tar.gz: e73756f0138589d1b6b6abe1cd4bd02be5b80667570ff74fedf8fb774ab27a421a8587d32bab75214640b1c69276bd153b9b2cd5c81252bd008a022966bd2551
|
data/README.md
CHANGED
@@ -89,6 +89,14 @@ document do
|
|
89
89
|
item "Mr. #{name}"
|
90
90
|
end
|
91
91
|
end
|
92
|
+
|
93
|
+
|
94
|
+
# At any time, you can use the delimiters `<##` and `##>` to inject LaTeX code. Note that the following characters won't be escaped: '\\', '\]', '\['.. The delimiters are part of the Rulex file syntax, and are translated into Ruby calls when the file is process; they aren't some kind of Ruby magic.
|
95
|
+
<## \subsection{Some pure \latex}
|
96
|
+
|
97
|
+
And some more here.
|
98
|
+
|
99
|
+
##>
|
92
100
|
end
|
93
101
|
```
|
94
102
|
|
data/examples/count.rex
CHANGED
@@ -52,4 +52,12 @@ document do
|
|
52
52
|
item "Mr. #{name}"
|
53
53
|
end
|
54
54
|
end
|
55
|
+
|
56
|
+
|
57
|
+
# At any time, you can use the delimiters `<##` and `##>` to inject LaTeX code. Note that the following characters won't be escaped: '\\', '\]', '\['.. The delimiters are part of the Rulex file syntax, and are translated into Ruby calls when the file is process; they aren't some kind of Ruby magic.
|
58
|
+
<## \subsection{Some pure \latex}
|
59
|
+
|
60
|
+
And some more here.
|
61
|
+
|
62
|
+
##>
|
55
63
|
end
|
data/examples/count.tex
CHANGED
data/lib/rulex/rex/reader.rb
CHANGED
@@ -20,9 +20,9 @@ module Rulex
|
|
20
20
|
instance_eval rex_to_ruby str
|
21
21
|
end
|
22
22
|
|
23
|
-
# There are a few characters ('\\', '\[' and '\]') that %q[] escapes
|
23
|
+
# There are a few characters ('\\', '\[' and '\]') that even %q[] escapes
|
24
24
|
def rex_to_ruby str
|
25
|
-
str.gsub(/<##(((?!##>)
|
25
|
+
str.gsub(/<##(((?!##>)[\s\S])+)##>/) { |m| "raw %q[" + $1.gsub("\\","\\\\\\\\") + "]"}
|
26
26
|
end
|
27
27
|
|
28
28
|
def add_node_to_content node
|
data/lib/rulex/version.rb
CHANGED