polytexnic 1.1.10 → 1.1.11

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: 4298fe4a7058d5ba79c05d3308750775c53638f3
4
- data.tar.gz: da2a65be59b1d2c48cef51b08d9a14ef35c35b73
3
+ metadata.gz: 706bbd563475beaaf0e35d39680f49d03823948c
4
+ data.tar.gz: b04ea45762732021a998210eccc8859498c0c366
5
5
  SHA512:
6
- metadata.gz: e3595c332dc1fb845072366bca952d98b38f8d6455cd68108861342136a0ce19bdc376d080ac855f309d62f4f9b7e70a1d9e9bf1753e85533bd33d52266cda70
7
- data.tar.gz: 9999ae1879c2cea5e98bacd3b66950233a754779bdb8233140607fd4b7af21fa6d8c160a7f99a8809882700dd11f6d0068ba2a331efd7d2ef799575cd84c4a6e
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)
@@ -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
- included_text = File.read("#{$1}.#{ext}")
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)
@@ -1,3 +1,3 @@
1
1
  module Polytexnic
2
- VERSION = "1.1.10"
2
+ VERSION = "1.1.11"
3
3
  end
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.10
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-11-25 00:00:00.000000000 Z
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.2.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