infoboxer 0.2.6 → 0.2.7

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: 261019d3c88be6d1292ce5aa8787962185b89a86
4
- data.tar.gz: 923feaa8759259e70d367b8cf6408f42c7475b79
3
+ metadata.gz: 3dc65cf33309c84191cac67a24377302a220a899
4
+ data.tar.gz: 64d1a9f50089fa0b676ffa02db045efce5445100
5
5
  SHA512:
6
- metadata.gz: 24cba9cb4d7c91df7b90ee6cf8228d74201c78687d25e737c012b020a6127045de5490b9273fa0aff65449c46ba4c17198e6d3da4ab92f187af2b7cbe4dfd472
7
- data.tar.gz: fdd9e52f22c3e052833b32c4f6100de0e050ce306c48ea4a6d791293c89ba87ed91dfed573a9ccb918c46c7375732a12dfdc1ed594badcc5bad72006cacc7e2e
6
+ metadata.gz: b7850a54a7aa864dd0d5d4c8e741877b3bde859d3bd19b0dde1303a411f6948c58144e6fd2389df7626d3b3e967063b2784f91a34bd69b7c6375598e6051044f
7
+ data.tar.gz: 59cd28da34d3e66c6ecb971985d7fbfecb3f649911f45a8d205df156899d4a265a887f30566a9825f67ca3a4457638c92b4966f75e559c36ea310eb94d05e212
@@ -1,5 +1,11 @@
1
1
  # Infoboxer's change log
2
2
 
3
+ ## 0.2.7 (2016-09-18)
4
+
5
+ * Fix `Math` node rendering to text (#68);
6
+ * Fix consequtive apostrophes problem (#69);
7
+ * Fix math parsing in templates (#70).
8
+
3
9
  ## 0.2.6 (2016-06-27)
4
10
 
5
11
  _0.2.5 was erroneously released without any changes._
@@ -3,7 +3,7 @@ module Infoboxer
3
3
  class Parser
4
4
  module Template
5
5
  include Tree
6
-
6
+
7
7
  # NB: here we are not distingish templates like `{{Infobox|variable}}`
8
8
  # and "magic words" like `{{formatnum:123}}`
9
9
  # Just calling all of them "templates". This behaviour will change
@@ -12,7 +12,7 @@ module Infoboxer
12
12
  def template
13
13
  name = @context.scan_continued_until(/\||:|}}/) or
14
14
  @context.fail!("Template name not found")
15
-
15
+
16
16
  name.strip!
17
17
  vars = @context.eat_matched?('}}') ? Nodes[] : template_vars
18
18
  @context.traits.templates.find(name).new(name, vars)
@@ -21,10 +21,10 @@ module Infoboxer
21
21
  def template_vars
22
22
  num = 1
23
23
  res = Nodes[]
24
-
24
+
25
25
  guarded_loop do
26
26
  @context.next! while @context.eol?
27
- if @context.check(/\s*([^ =}|]+)\s*=\s*/)
27
+ if @context.check(/\s*([^ =}|<]+)\s*=\s*/)
28
28
  name = @context.scan(/\s*([^ =]+)/).strip
29
29
  @context.skip(/\s*=\s*/)
30
30
  else
@@ -5,7 +5,7 @@ module Infoboxer
5
5
  attr_reader :re
6
6
 
7
7
  FORMATTING = /(
8
- '{2,5} | # bold, italic
8
+ '''''|'''|'' | # bold, italic, bold italic
9
9
  \[\[ | # link
10
10
  {{ | # template
11
11
  \[[a-z]+:\/\/ | # external link
@@ -4,6 +4,9 @@ module Infoboxer
4
4
  #
5
5
  # See also: https://en.wikipedia.org/wiki/Help:Displaying_a_formula
6
6
  class Math < Text
7
+ def text
8
+ "<math>#{super}</math>"
9
+ end
7
10
  end
8
11
  end
9
12
  end
@@ -2,6 +2,6 @@
2
2
  module Infoboxer
3
3
  MAJOR = 0
4
4
  MINOR = 2
5
- PATCH = 6
5
+ PATCH = 7
6
6
  VERSION = [MAJOR, MINOR, PATCH].join('.')
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: infoboxer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Shepelev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-27 00:00:00.000000000 Z
11
+ date: 2016-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities