yeptris 0.6.36.0 → 0.6.37.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2ac5a7348d464838d4c6da16ab1a579423f30149936adeee3e2e46ea83cde163
4
- data.tar.gz: 265108ae979d918dffb870acacbd42a86b5569c5df04f8642f0012c91d464c2d
3
+ metadata.gz: 21d7aeafdf87354e93274fd18b06de28ce461ae8cc05e6099db13b4fc4015c2a
4
+ data.tar.gz: 6023fd4222e75a11e1af43f29428a62dc53e40f6115eff376c2967a165fbea4d
5
5
  SHA512:
6
- metadata.gz: 345cf71ecfc482b1b7471346affb2e79b857a6e467378902786677af08613bf03d5c6a8eb65f6c1ec5c4b6e4b0e624a58c326638b16eabe4b38bf56e566c369f
7
- data.tar.gz: 617a17fbe98d6cb8d7a94bcc0e1b5af49da2243aaaca11af4c50b130ffb8d071a050d40d9ea862a8a97bf65f20c957df18b18652982e7aa5814296687276e818
6
+ metadata.gz: e4f2edd4df325413745e537f097a84f08607839c63f40a8737b5381429e7e85ebe47bdfd0bb16a4b028d9967df3bb7cabc6716ce1525b3558bb31563f5b37a50
7
+ data.tar.gz: ca9a4a7e1f14025dfb9d3b42b7a7a1cf9c51fda65a6a49e0c6287a23dbf1e9cc0dfb02f4fd38ec6eaa272a6e298aaa7b6c24cee496a59665bbab622316914cfe
data/lib/yeptris.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  module Yeptris
4
4
  # The gem's version lives in the parent namespace's file — the last
5
5
  # internal require (yeptris/version) retired with it.
6
- VERSION = "0.6.36.0".freeze
6
+ VERSION = "0.6.37.0".freeze
7
7
 
8
8
  # Informational notices are OPT-IN (yeptris-ruby#217): consumers
9
9
  # embed yeptris inside CLIs that assert clean stderr, and a
@@ -3,7 +3,7 @@
3
3
  cmake_minimum_required(VERSION 3.20)
4
4
 
5
5
  project(yeptris
6
- VERSION 0.6.36
6
+ VERSION 0.6.37
7
7
  DESCRIPTION "Ultra-fast YAML 1.2 parser, emitter and streamer in C"
8
8
  LANGUAGES C CXX
9
9
  )
@@ -1275,6 +1275,27 @@ static void e_props(yep_engine* e, yep_view* anchor, yep_view* tag) {
1275
1275
  e_fail(e, YEP_ERR_UNEXPECTED, e->pos);
1276
1276
  return;
1277
1277
  }
1278
+ /* The flow-follower colon law (the nightly's round 29,
1279
+ * crash-47eb4054): a name ending at a riding colon whose
1280
+ * follower is a FLOW collection un-consumes the colon.
1281
+ * libyaml ACCEPTS "&k2: [1,\n2]" — the anchor names the
1282
+ * implicit-null KEY and the flow is the value — so the
1283
+ * riding law (2SXE) must yield exactly where its result
1284
+ * is observable in the differential; the plain-led twins
1285
+ * keep it (libyaml rejects those: "&a: key: v", W5VH's
1286
+ * value position — suite-VALID, ledgered). The colon
1287
+ * re-lexes as the key indicator and the existing colon
1288
+ * arm builds the anchored null key. */
1289
+ if (e->p[e->pos - 1] == ':') {
1290
+ size_t t = e->pos;
1291
+ while (t < e->len && (e->p[t] == ' ' || e->p[t] == '\t')) {
1292
+ t++;
1293
+ }
1294
+ if (t < e->len && (e->p[t] == '[' || e->p[t] == '{')) {
1295
+ anchor->len -= 1;
1296
+ e->pos -= 1;
1297
+ }
1298
+ }
1278
1299
  if (e->pos < e->len && e->p[e->pos] == '#') {
1279
1300
  /* the name ends at a blank or flow indicator; a glued
1280
1301
  * '#' is junk on the name (libyaml: "did not find
@@ -4942,7 +4963,26 @@ static size_t step_scan(yep_stepstate* st) {
4942
4963
  st->bs_indent = (uint32_t)-1; /* root rule: markers only */
4943
4964
  }
4944
4965
  }
4945
- if (st->saw_directive == 0 && i > 0 && !st->bs_open) {
4966
+ /* the line before a marker must not be a
4967
+ * directive-LOOKING line: the scan's quote
4968
+ * state can close a quote where the parser
4969
+ * reads content (or vice versa), so a %-led
4970
+ * line may ride an open quote the scan
4971
+ * believes in -- cutting then strands the
4972
+ * directive from its --- and the window
4973
+ * rejects it (the nightly's round 27,
4974
+ * crash-95bbd95f: "i\n\"\n...\n%TAG ! \"\n--- ").
4975
+ * The check is byte-level, independent of the
4976
+ * quote tracking's verdict. */
4977
+ int prev_pct = 0;
4978
+ if (i > 0) {
4979
+ size_t ls = i - 1; /* the break before the marker */
4980
+ while (ls > 0 && p[ls - 1] != '\n' && p[ls - 1] != '\r') {
4981
+ ls--;
4982
+ }
4983
+ prev_pct = p[ls] == '%';
4984
+ }
4985
+ if (st->saw_directive == 0 && i > 0 && !st->bs_open && !prev_pct) {
4946
4986
  last_cut = i; /* interior document boundary */
4947
4987
  }
4948
4988
  st->saw_directive = 0; /* this --- owns the directives */
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yeptris
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.36.0
4
+ version: 0.6.37.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.