rulex 0.1.4 → 0.1.5

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
  SHA1:
3
- metadata.gz: bed57ce48166e9fd4098a7bdb005aa1547f8a387
4
- data.tar.gz: 2b7bdd9322fc92f6842bda43a39787dace26fffa
3
+ metadata.gz: 6509b0f600b1236371fcd853fe2274722aaab361
4
+ data.tar.gz: b90f15e2ef9fc81756f53e83ebfdf8eb89f25e32
5
5
  SHA512:
6
- metadata.gz: 426395fdabefb0a5003eea0a072599ca2df66d663113b754527fc92079ed5da31443a62380932d0bdb106837ccb927d6daf8a6d68e456f17552e50c8b9793a42
7
- data.tar.gz: 785ab466a702b3e5a2787f91b457e464a2fc65ca718dc9af3d968610cf29ead1681319855d52ba4ee835b9eec80f8d148cf95607268ecfa7e7227c7813f09ee7
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
@@ -32,4 +32,8 @@ Finally I would like to thank
32
32
  \item{Mr. Donald Knuth}
33
33
  \item{Mr. Yukihiro Matsumoto}
34
34
  \end{enumerate}
35
- \end{document}
35
+ \subsection{Some pure \latex}
36
+
37
+ And some more here.
38
+
39
+ \end{document}
@@ -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 anyway
23
+ # There are a few characters ('\\', '\[' and '\]') that even %q[] escapes
24
24
  def rex_to_ruby str
25
- str.gsub(/<##(((?!##>).)+)##>/) { |m| "raw %q[" + $1.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
@@ -1,3 +1,3 @@
1
1
  module Rulex
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rulex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicolas Mattia