relaton-render 0.3.4 → 0.3.5

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
  SHA256:
3
- metadata.gz: ffb9cdf17ba3f47947a747bd8867ea9e7c47a98d458756ec947ee4423dc6b303
4
- data.tar.gz: d3a34c0f04cdb456517403b16fa3055ceb5e78162a44570e05ed5da16163c6ea
3
+ metadata.gz: ba6bd04a097e0a57a1b55548d1775f54297d707271da779330c679e1a1e3fc8f
4
+ data.tar.gz: 39115748cd3ffea7793a2d662c22c26a4219baa4969e42b048aec0bc7c8a157f
5
5
  SHA512:
6
- metadata.gz: 4a2aa5ae8d17b38ad0e79e575b9852127886a93ceafa5003ed1fc36d0bfb28e5a51733059b0a4c68256acdf62f3f1fd95195e68cf1e2b8d050fd753b6230f1a4
7
- data.tar.gz: 5bd29bd5368dc53408da0888cb11734a580041288132a0a73b1e93206849b527df5ee7bbb771734274be9d2927f098f9dea798bcdadd1c7d52ae2f909e52f1d7
6
+ metadata.gz: ce06415c2964c88e26eea1db635bca0928c381e40f18f395a8a227ea848d65d0c025decba2df2141ff411e542d244724146834744024bd24b2b8e9e7a4eb0a51
7
+ data.tar.gz: b0e94d253c820e8afb429ee8512de473c7a1a1f536ec6643efc7a7411bb46fba29ec104bcff7e764f4cd9cf2661023374521cf1fc5907b97ca9e564cf1e5bd52
data/README.adoc CHANGED
@@ -132,6 +132,7 @@ The Liquid template surrounds each field by preceding and following punctuation.
132
132
  * If fields are not space-delimited, this is indicated by inserting `|`. So `{{ title }}|{{ medium}}` is two fields, rendered with no space separation.
133
133
  * If the field is empty, its surrounding markup is also removed. So if there is no medium, then `[{{medium}}]` is not rendered, and the brackets will be stripped.
134
134
  * Underscore is treated as space, attaching to the preceding or following field. So `,_{{ edition }}_{{ labels['edition'] }}` is treated as the one field.
135
+ * Underscore is escaped by \. So `<span_class="std\_note">` maps to `<span class="std_note">`.
135
136
  * If punctuation is space delimited, it is inserted regardless of preceding content. So `{{ creatornames }} ({{date}}) .` will insert the full stop whether or not the date is present.
136
137
  * Space between punctuation and before punctuation is automatically removed.
137
138
 
@@ -80,7 +80,8 @@ module Relaton
80
80
  .gsub(/\s+([,.:;)])/, "\\1")
81
81
  .sub(/^\s*[,.:;]\s*/, "")
82
82
  .sub(/[,:;]\s*$/, "")
83
- .gsub(/_/, " ")
83
+ .gsub(/(?<!\\)_/, " ")
84
+ .gsub(/\\_/, "_")
84
85
  .gsub(/#{NON_SPACING_DELIM}/o, "").gsub(/\s+/, " ")
85
86
  end
86
87
 
@@ -1,5 +1,5 @@
1
1
  module Relaton
2
2
  module Render
3
- VERSION = "0.3.4".freeze
3
+ VERSION = "0.3.5".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-render
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-04-28 00:00:00.000000000 Z
11
+ date: 2022-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler