Cuneyt Ozturk Claude Opus 5.5 commited on
Commit
e313182
·
1 Parent(s): 92fe08e

Playground: read YAML with the registry's parseYaml when available

Browse files

Uses canonical.js parseYaml (PRML v0.1 erratum 2026-11-15 reading
rules) and falls back to js-yaml load while the served canonical.js
predates it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Files changed (1) hide show
  1. index.html +3 -1
index.html CHANGED
@@ -344,7 +344,9 @@ async function update() {
344
  const text = src.value;
345
  let parsed;
346
  try {
347
- parsed = jsyaml.load(text);
 
 
348
  } catch (e) {
349
  canonicalEl.textContent = '(YAML parse error: ' + e.message + ')';
350
  hashEl.textContent = '-';
 
344
  const text = src.value;
345
  let parsed;
346
  try {
347
+ // The registry module also carries the shared PRML reading of YAML (JSON number
348
+ // spellings only, no unquoted timestamps); use it whenever it loaded.
349
+ parsed = (sharedCanon && sharedCanon.parseYaml) ? sharedCanon.parseYaml(jsyaml, text) : jsyaml.load(text);
350
  } catch (e) {
351
  canonicalEl.textContent = '(YAML parse error: ' + e.message + ')';
352
  hashEl.textContent = '-';