Closed quantimnot closed 2 years ago
import yaml, strutils var str = dump(repeat("00 ", 27)) echo str # valid load(str, str) # works str = dump(repeat("0 ", 40)) echo str # invalid load(str, str) # fails # output # # %YAML 1.2 # %TAG !n! tag:nimyaml.org,2016: # --- # !!str >- # 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 # %YAML 1.2 # %TAG !n! tag:nimyaml.org,2016: # --- # !!str >- 0 # 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 # [NimYAML] Error in file serialization.nim at line 1355: # Unexpected exception: LexerError # … stacktrace [YamlStreamError: Illegal character after block scalar header: "0"]
Pretty sure this fixes it, but I currently don't have a working Nim dev env so please test and report back!
(you can nimble install yaml#head to get this fix)
nimble install yaml#head
Thank you! I was juuust getting into that proc :)