polytexnic 1.0.beta5 → 1.0.beta6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5a8660e3ba5020ca916133a4dd388a904a44515a
4
- data.tar.gz: 5677ef66765af80c5620c19ee5fe2f8f8c2f4218
3
+ metadata.gz: b8214313558b4c38e7812a1372478a5efde8e597
4
+ data.tar.gz: 1ef44af2eeed1ba0492745434c360bf4b3dc2e87
5
5
  SHA512:
6
- metadata.gz: f0bbb2b8122364b561ff3918907eea18d8159a18b2cda446d511730cc663ffdbd3bdc09267136cf2e4fff09740921c6be217e9c572abb25557b3e520cab66eea
7
- data.tar.gz: 17299412d2276f2bc78b79938c3031d7cbe1cfec9715cfc12ae990b50d2e1bc47e413cf7a4f870c1497b94b05eb845e7f190d8fc7b15ad792a846508ad9e6d12
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
@@ -1,3 +1,3 @@
1
1
  module Polytexnic
2
- VERSION = "1.0.beta5"
2
+ VERSION = "1.0.beta6"
3
3
  end
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polytexnic
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.beta5
4
+ version: 1.0.beta6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Hartl