yeptris 0.6.77.0 → 0.6.78.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: 6cd9b9104a41fbbb49a40f4c3cae35c8fe772329acebce4c360aa36bee86c63a
4
- data.tar.gz: 3fb26a04d53e75f6ad9fa985d24d1287aa031ccceb78ab6f7d387f9adaadfce4
3
+ metadata.gz: f3248647a676e1d6f5136a2818fd2e3bec178faeb8331ed087b81c007df28722
4
+ data.tar.gz: e3d4925be277f42bd83a6550a5f954b694a975f6ea5e356c0a2c794feebc5333
5
5
  SHA512:
6
- metadata.gz: 1ccc012a691b35c6baa76fe7861f022ee40f00b72c73c33514511f126342fd0b84d4981e594fef38732d83ead4f5ccac1eb110907750a591a56d2da1f65ceb5c
7
- data.tar.gz: b0fbde85409106f1c4d8a65cbccc3743e49b67654777bcbe6a39e339186a76bf8abb4ec85058c5b5460f816465c80b341380bee8fa9de7c24cafab34f62ad7c0
6
+ metadata.gz: dbcf2afd4a6861f8e001551beaa9f7c9dc9136c19524f40eae17a2db9c7684314ca639f4f678df62923f807d50bdf78a48dda152b5d7504f10ab4e62ac52ab75
7
+ data.tar.gz: 62837490b44f713b7591202efa3fdb6caf96ee5b47d291e88bfc01089284f1ef2c2951f7c221c077855642ad8a9c2fb2ac136672ae1fa41745e3cb62bd4dd069
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.77.0".freeze
6
+ VERSION = "0.6.78.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.77
6
+ VERSION 0.6.78
7
7
  DESCRIPTION "Ultra-fast YAML 1.2 parser, emitter and streamer in C"
8
8
  LANGUAGES C CXX
9
9
  )
@@ -5386,6 +5386,29 @@ static size_t norm_next_fold_break(const char* p, size_t len, size_t i, size_t*
5386
5386
  return 0;
5387
5387
  }
5388
5388
 
5389
+ /* The block-fold reader's line crossing. The fold's lines end at ANY
5390
+ * break the engine normalizes (LF, lone CR, CRLF, NEL, LS/PS) — the
5391
+ * one-shot walk's law. The old '\n'-only scans swallowed the line
5392
+ * after a CR-terminated fold line whole, hiding its flow openers and
5393
+ * explicit-key '?' markers from the cut guard: the scan's in_flow
5394
+ * never rose, the next --- looked like a safe interior cut, and the
5395
+ * cut landed inside the engine's still-open flow, mid-token (the
5396
+ * r372 nightly, run 45234218847). Returns the loop's landing offset
5397
+ * (just past the break, the same byte a visited break arm would arm
5398
+ * from) with the line-start state carried, or SIZE_MAX when the
5399
+ * line's break has not arrived yet (the caller holds). */
5400
+ static size_t step_fold_line_cross(yep_stepstate* st, size_t k) {
5401
+ size_t br = 0;
5402
+ size_t e = norm_next_fold_break(st->buf, st->len, k, &br);
5403
+ if (br == 0) {
5404
+ return SIZE_MAX; /* the break rides in a later chunk */
5405
+ }
5406
+ st->tok_start = 1;
5407
+ st->word_led = 0;
5408
+ st->at_break = 1;
5409
+ return e + br - 1;
5410
+ }
5411
+
5389
5412
  static int step_bs_header(const char* p, size_t len, size_t i) {
5390
5413
  size_t k = i + 1;
5391
5414
  int chomp = 0, indent = 0, space = 0;
@@ -5690,15 +5713,12 @@ static size_t step_scan(yep_stepstate* st) {
5690
5713
  break;
5691
5714
  }
5692
5715
  if (p[k] == '\n' || p[k] == '#') {
5693
- size_t e = k;
5694
- while (e < st->len && p[e] != '\n') {
5695
- e++;
5696
- }
5697
- if (e >= st->len) {
5716
+ size_t land = step_fold_line_cross(st, k);
5717
+ if (land == SIZE_MAX) {
5698
5718
  hold = i;
5699
5719
  break;
5700
5720
  }
5701
- i = e; /* blank or comment content: the loop's i++ crosses the break */
5721
+ i = land; /* blank or comment content: the loop's i++ crosses the break */
5702
5722
  continue;
5703
5723
  }
5704
5724
  int marker =
@@ -5711,15 +5731,12 @@ static size_t step_scan(yep_stepstate* st) {
5711
5731
  if (!marker && st->bs_indent != (uint32_t)-1 && ind <= st->bs_indent) {
5712
5732
  st->bs_open = 0; /* the fold ends here: normal processing resumes */
5713
5733
  } else {
5714
- size_t e = k;
5715
- while (e < st->len && p[e] != '\n') {
5716
- e++;
5717
- }
5718
- if (e >= st->len) {
5734
+ size_t land = step_fold_line_cross(st, k);
5735
+ if (land == SIZE_MAX) {
5719
5736
  hold = i;
5720
5737
  break;
5721
5738
  }
5722
- i = e;
5739
+ i = land;
5723
5740
  continue;
5724
5741
  }
5725
5742
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yeptris
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.77.0
4
+ version: 0.6.78.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-11-22 00:00:00.000000000 Z
11
+ date: 2026-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi