barefoot_js 0.34.0 → 0.35.0
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 +4 -4
- data/lib/barefoot_js.rb +16 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9543a49df4b2eee8431bda7b44cabfe30268e917937dcd3be6db87127b8617d4
|
|
4
|
+
data.tar.gz: dea994d91c8010372fcb4ee3c0e2a3cfe5baf5f73aef51e20d59bed25e90807f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5ac1295c85cc4838934d5dbcc642941bc0253bb7eca334fbbd8cc8da23d2ab1c263625d9f50e786b9698481487b4c143f6927c89378086ff1045b3ea69d55055
|
|
7
|
+
data.tar.gz: 98b3d79949c9028dbb92fcf056c986b7ee65dcaba7cf7d623ab3772d6ce53205ae93233f8b35458abe60156e6ad3ee2c667240c140be0b9cc1fca3142c47460c
|
data/lib/barefoot_js.rb
CHANGED
|
@@ -184,6 +184,22 @@ module BarefootJS
|
|
|
184
184
|
"<!--bf-#{text}-->"
|
|
185
185
|
end
|
|
186
186
|
|
|
187
|
+
# Neutralize a value for splicing into `comment`'s HTML comment content
|
|
188
|
+
# (#2795 follow-up). `comment` itself does no escaping -- fine for every
|
|
189
|
+
# other caller (marker IDs like "cond-start:s0", "loop:l0", ...), which
|
|
190
|
+
# are entirely compiler-generated, but the whole-item-conditional loop's
|
|
191
|
+
# "loop-i:<key>" anchor carries a user-controlled key. Standard HTML
|
|
192
|
+
# escaping doesn't help inside a comment -- only the literal sequence
|
|
193
|
+
# "-->" terminates it early, and &/</>/"/' are not special there. The
|
|
194
|
+
# key's exact text doesn't need to round-trip (the client's
|
|
195
|
+
# mapArrayAnchored matches items positionally and by its own
|
|
196
|
+
# JS-computed key, never by re-parsing the anchor Comment.nodeValue), so
|
|
197
|
+
# replacing every "-" with the visually-similar U+2010 is sufficient and
|
|
198
|
+
# needs no decoding.
|
|
199
|
+
def escape_comment_key(value)
|
|
200
|
+
string(value).gsub('-', '‐')
|
|
201
|
+
end
|
|
202
|
+
|
|
187
203
|
# Map a JS-boolean-shaped value to the JS `String(bool)` form. See
|
|
188
204
|
# BarefootJS.pm's `bool_str` docstring for the boolean-only contract --
|
|
189
205
|
# callers must have already classified the expression as boolean-
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: barefoot_js
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.35.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- kobaken
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-09-
|
|
11
|
+
date: 2026-09-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: tzinfo
|