polytexnic 1.1.10 → 1.1.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/polytexnic/preprocessors/polytex.rb +0 -1
- data/lib/polytexnic/utils.rb +2 -1
- data/lib/polytexnic/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 706bbd563475beaaf0e35d39680f49d03823948c
|
4
|
+
data.tar.gz: b04ea45762732021a998210eccc8859498c0c366
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79e3505b7f85d7b411b73b9f027a65dd8b23afa4bb7cec4db3ca62fdfa836d543bcc44c0224f8056fb76437f87ee0fe5826ee51cecba8121a6462d6ccd501e5e
|
7
|
+
data.tar.gz: b5f89f4165348e6d37b2fe6cddd4c2c2f3e14a44eda5086ef9962e5893fea5dcbda1f9b4013f6343b8f878be2b09c4138a0929a10df8676de86351d4dcbeec16
|
@@ -89,7 +89,6 @@ module Polytexnic
|
|
89
89
|
cleaned_markdown = cache_code_environments(@source)
|
90
90
|
expand_input!(cleaned_markdown,
|
91
91
|
Proc.new { |source| cache_code_environments(source) })
|
92
|
-
|
93
92
|
puts cleaned_markdown if debug?
|
94
93
|
cleaned_markdown.tap do |markdown|
|
95
94
|
convert_code_inclusion(markdown)
|
data/lib/polytexnic/utils.rb
CHANGED
@@ -35,7 +35,8 @@ module Polytexnic
|
|
35
35
|
# Expands '\input' command by processing & inserting the target source.
|
36
36
|
def expand_input!(text, code_function, ext = 'md')
|
37
37
|
text.gsub!(/^[ \t]*\\input\{(.*?)\}[ \t]*$/) do
|
38
|
-
|
38
|
+
# Prepend a newline for safety.
|
39
|
+
included_text = "\n" + File.read("#{$1}.#{ext}")
|
39
40
|
code_function.call(included_text).tap do |clean_text|
|
40
41
|
# Recursively substitute '\input' in included text.
|
41
42
|
expand_input!(clean_text, code_function, ext)
|
data/lib/polytexnic/version.rb
CHANGED
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.1.
|
4
|
+
version: 1.1.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Hartl
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-12-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|
@@ -292,7 +292,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
292
292
|
version: '0'
|
293
293
|
requirements: []
|
294
294
|
rubyforge_project:
|
295
|
-
rubygems_version: 2.
|
295
|
+
rubygems_version: 2.4.5
|
296
296
|
signing_key:
|
297
297
|
specification_version: 4
|
298
298
|
summary: Convert from PolyTeX & Markdown to HTML & LaTeX
|