polytexnic 1.9.1 → 1.9.2

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
  SHA256:
3
- metadata.gz: 1b5dc960f818c0dd1342080a1d886582ecdd67a8ccf7688cae86e79c18309278
4
- data.tar.gz: 24f2ce7be9a136c54aacab4a78d47ff17598182c8095038c95c6a215ab0c45f4
3
+ metadata.gz: 7fd013155e321745a2fa54c50bfc39826c9908e3cd6fa4aca280197c805cb6f3
4
+ data.tar.gz: cf219afa3a0f99c57536bbf9e5e75776515b56b3eec36b3ccd5f4a9adc63c597
5
5
  SHA512:
6
- metadata.gz: e972fa4b84925ef11ac37e246184811bd5630ac3b6036f9609a67dd5816be0e04c53ea15db9e440571f596ad341e88316eeaf488137c61da8395503f0ea0fba1
7
- data.tar.gz: 1140d6a5159c5c166a8eb3c7db75882a93782b976721e1bac76a7c29439a702a76c1cfcbdc33166090c53adcb2b013663e55a63fb5849147621516a697149c09
6
+ metadata.gz: 916e1ed5f71cf96fa311426dd8e87bd52e3fd0a0884744085dc9400da972d9648c3216e2c45b33bb50c1a77cbc08322e11ad8f1b8fb6620cd25fa6f69ee62ec1
7
+ data.tar.gz: a14021cf2f3d7f1d5634bb81198490baab22116484207392841107b1bcb86e9d814d6dedc01fba3b1e58320e28dff459a0e621b0d85f7e4472231c15ce8dacdf
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- polytexnic (1.9.1)
4
+ polytexnic (1.9.2)
5
5
  json (= 2.3.1)
6
6
  kramdown (= 2.4.0)
7
7
  msgpack (= 1.2.10)
@@ -23,14 +23,9 @@ module Polytexnic
23
23
  %w[align* eqnarray* equation* gather* multline*]
24
24
  end
25
25
 
26
- def math_environments_starred
27
- %w[align* eqnarray* equation* gather* multline*]
28
- end
29
-
30
26
  # Returns a list of all literal types.
31
27
  def literal_types
32
- %w[verbatim Vertatim code metacode] +
33
- math_environments
28
+ %w[verbatim Vertatim code metacode] + math_environments
34
29
  end
35
30
 
36
31
  # Handles environments that should be passed through the pipeline intact.
@@ -83,8 +78,6 @@ module Polytexnic
83
78
  literal_type = line.literal_type
84
79
  skip = line.math_environment? || latex
85
80
  if line.math_environment? && !latex
86
- # puts line
87
- # puts "****"
88
81
  output << '\begin{xmlelement*}{equation}'
89
82
  if line.starred?
90
83
  output << '\begin{equation*}'
@@ -18,7 +18,9 @@ module Polytexnic
18
18
  # Escapes backslashes even more.
19
19
  # Have I mentioned how much I hate backslashes?
20
20
  def extra_escape(string)
21
- string.gsub('\\', '\\\\\\')
21
+ string.gsub('\\', '\\\\\\').
22
+ gsub("\\'", '\\\\' + "'").
23
+ gsub('\\\\\\', '\\\\\\')
22
24
  end
23
25
  end
24
26
  end
@@ -1,3 +1,3 @@
1
1
  module Polytexnic
2
- VERSION = "1.9.1"
2
+ VERSION = "1.9.2"
3
3
  end
@@ -103,6 +103,19 @@ end
103
103
 
104
104
  it { should resemble polytex }
105
105
 
106
+ context "align* environment" do
107
+ let(:polytex) do <<-'EOS'
108
+ \begin{align*}
109
+ x &= 1\\
110
+ y & = 2 \\
111
+ x + y &= 3
112
+ \end{align*}
113
+ EOS
114
+ end
115
+
116
+ it { should resemble polytex }
117
+ end
118
+
106
119
  context "containing an example of highlighted code" do
107
120
  let(:polytex) do <<-'EOS'
108
121
  \begin{verbatim}
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.9.1
4
+ version: 1.9.2
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: 2023-08-20 00:00:00.000000000 Z
12
+ date: 2023-08-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri