moxml 0.5.25 → 0.5.26

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: 7962623114db23fce306ee38745c51ccf85fe8333c60a274322eb3d5a6dd6270
4
- data.tar.gz: 00b614eed4a674d4ad43a1cbf1f4dd0483de2e929b7e78728c4aab7106662b56
3
+ metadata.gz: b7d4ecc2bb794f60a6b240faf3828c7847da9eebf8d45e44b35dd863f8ef7b09
4
+ data.tar.gz: 04d2ecbc979863a35825a8ba95a7897d4f7d395629c5ca959dfa8fd96c71a662
5
5
  SHA512:
6
- metadata.gz: 9e49d1c70a4332def347256eccf22f7defa256eaec8290987a73079daa0bcfed0f141f4862a9b457fbbc6f606be5386c3d5717e35e767b1088d2e7f88e0fde5d
7
- data.tar.gz: d3ad61616f0b7bf163fef6333c59595bbce7b40dc96fd01c7a64f8bf2e8db2419102f3633444d1a54453bff7f6ad170051f75c9756e1c406233e25716426f3c7
6
+ metadata.gz: a63b4c25f0838edbb6ba6cb787b68000e614afbfbb700a3167a5222ab7219fef4f7add25a009991de44b78eeb2b117c96f0743655e0fa058e4ac3d697877093b
7
+ data.tar.gz: c8700770e6873e0a9af730cc94b149c019d63df0aadd585f3f382e1c4fe4246d9d4bb243e9f8347ed4bdb83b67d84aa497de69152cf3ea2921c6be55b9037d05
@@ -90,7 +90,9 @@ module Moxml
90
90
  # apostrophes literal; older engines escaped them.
91
91
  needs_apos = !LIBXML2_LAYOUT_PARITY && xml.include?("'")
92
92
  needs_expand = options[:expand_empty] && xml.include?("/>")
93
- needs_amp = xml.include?("&") && xml.match?(RAW_AMP_RE)
93
+ # One scan: the bare-ampersand regex fails fast on
94
+ # ampersand-free output — no include? pre-filter needed.
95
+ needs_amp = xml.match?(RAW_AMP_RE)
94
96
  return xml unless needs_apos || needs_expand || needs_amp
95
97
 
96
98
  out = +""
data/lib/moxml/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Moxml
4
- VERSION = "0.5.25"
4
+ VERSION = "0.5.26"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moxml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.25
4
+ version: 0.5.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.