polytexnic 1.0.beta5 → 1.0.beta6
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/lib/polytexnic/preprocessors/polytex.rb +1 -1
- data/lib/polytexnic/version.rb +1 -1
- data/spec/markdown_to_polytex_spec.rb +24 -0
- 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: b8214313558b4c38e7812a1372478a5efde8e597
|
|
4
|
+
data.tar.gz: 1ef44af2eeed1ba0492745434c360bf4b3dc2e87
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: db0b6d8db2eb0528020c968f5c09b48d6c466353f6f9a0cd7e72ac5ac6670403c2fbf378a5064cf34baf50c225363cf1a57f081cf62f4a39ab3a01eb983fc4bb
|
|
7
|
+
data.tar.gz: cb41614488b7185e7ed03a93599c4f85bf7897a29c684fc8dd28bdccba83da131354f77b25b9cd9a36e659b6313d8e720a8d16128e1d8935c5cde86ed820fcc2
|
|
@@ -218,7 +218,7 @@ module Polytexnic
|
|
|
218
218
|
code_cache[key] = [code, language]
|
|
219
219
|
output << key
|
|
220
220
|
output << line
|
|
221
|
-
elsif line =~ /^```(\w*)(,\s*options:.*)?$/ # highlighted fences
|
|
221
|
+
elsif line =~ /^```([\w+]*)(,\s*options:.*)?$/ # highlighted fences
|
|
222
222
|
count = 1
|
|
223
223
|
language = $1.empty? ? 'text' : $1
|
|
224
224
|
options = $2
|
data/lib/polytexnic/version.rb
CHANGED
|
@@ -468,6 +468,30 @@ lorem
|
|
|
468
468
|
it { should resemble output }
|
|
469
469
|
end
|
|
470
470
|
|
|
471
|
+
context "with a compound language" do
|
|
472
|
+
let(:source) do <<-EOS
|
|
473
|
+
# Softcover-flavored Markdown
|
|
474
|
+
|
|
475
|
+
HTML and PHP:
|
|
476
|
+
|
|
477
|
+
```html+php
|
|
478
|
+
Name: <input type="text" name="name" value="<?php echo $name;?>">
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
As a final enhancement
|
|
482
|
+
EOS
|
|
483
|
+
end
|
|
484
|
+
|
|
485
|
+
let(:output) do <<-'EOS'
|
|
486
|
+
%= lang:html+php
|
|
487
|
+
\begin{code}
|
|
488
|
+
Name: <input type="text" name="name" value="<?php echo $name;?>">
|
|
489
|
+
\end{code}
|
|
490
|
+
EOS
|
|
491
|
+
end
|
|
492
|
+
it { should resemble output }
|
|
493
|
+
end
|
|
494
|
+
|
|
471
495
|
context "with highlighting and options" do
|
|
472
496
|
let(:source) do <<-EOS
|
|
473
497
|
```ruby, options: "hl_lines": [1, 2], "linenos": true
|