ovec 0.0.3 → 0.0.4
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/TODO +2 -0
- data/lib/ovec/parser.rb +1 -1
- data/lib/ovec/version.rb +1 -1
- data/test/lib/ovec/parser.rb +7 -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: 4cd291329ae45df6cd73039e89ac54514e8efc02
|
4
|
+
data.tar.gz: 652bcbed3b41159d950bc3237342220b5f92ad09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a260706b9eac18d8dce615f94cc7ece17f35bdf3610d7d36cdc555343ae5a395929314916d24084c492aa4b04b7b70aa55d9e5d09bdeeff08950d902c6c42080
|
7
|
+
data.tar.gz: fe9770df149b6e6564a0911d0792987f8910b0bee7736ef556b618f0a987f6096865ead065142fe8e849fc7a1e7859e95b0d1a4adacf6774e3088628c0b22e7b
|
data/TODO
CHANGED
data/lib/ovec/parser.rb
CHANGED
@@ -7,7 +7,7 @@ module Ovec
|
|
7
7
|
class Parser
|
8
8
|
NORMAL_REGEX = /\A([^\\$%])+/
|
9
9
|
# TODO: more escapes: there are probably 10x more...
|
10
|
-
COMMAND_REGEX = /\A\\([a-
|
10
|
+
COMMAND_REGEX = /\A\\([a-z@A-Z0-9]+|[-~%:,^$&\\ \]\[_\n#`"=.'<+])/
|
11
11
|
COMMENT_REGEX = /\A%.*$/
|
12
12
|
|
13
13
|
TEXT_COMMANDS = %w(textit textbf textsc title author)
|
data/lib/ovec/version.rb
CHANGED
data/test/lib/ovec/parser.rb
CHANGED
@@ -75,7 +75,13 @@ module Ovec
|
|
75
75
|
end
|
76
76
|
|
77
77
|
def test_weird_commands_parsed
|
78
|
-
text = '\%\ \\\ \ahoj
|
78
|
+
text = '\_\%\ \\\ \ahoj\~\^\,\:\$\&$\[\]$\[\] \[#1]{\,\hbox{#1}}\#\`\.\,a' + "\'\\\n\\<find>\+"
|
79
|
+
result = @parser.parse(text)
|
80
|
+
assert_equal text, result.to_tex
|
81
|
+
end
|
82
|
+
|
83
|
+
def test_command_with_at_parsed
|
84
|
+
text = '\@hoj\@'
|
79
85
|
result = @parser.parse(text)
|
80
86
|
assert_equal text, result.to_tex
|
81
87
|
end
|