From: Fumihiko Hata Date: Thu, 4 Jan 2024 16:40:59 +0000 (+0900) Subject: fixed: quoting KDL string nodes containing `//` to prevent them from being interprete... X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=af1f552bf4e75d52321cdd8188cd0f9524e9e894;p=onyx.git fixed: quoting KDL string nodes containing `//` to prevent them from being interpreted as comments --- diff --git a/core/encoding/kdl/encoder.onyx b/core/encoding/kdl/encoder.onyx index b1fe8661..8ea46d1b 100644 --- a/core/encoding/kdl/encoder.onyx +++ b/core/encoding/kdl/encoder.onyx @@ -4,6 +4,7 @@ package core.encoding.kdl KDL_TAB_SIZE :: 4 use core {io} +use core.string {contains} write :: (d: &Document, w: &io.Writer) { for d.nodes { @@ -19,7 +20,8 @@ write_node :: (n: &Node, w: &io.Writer, indentation := 0) { io.write_format(w, "({}) ", ta); }); - io.write(w, n.node); + if contains(n.node, "//") do io.write_format(w, "{\"}", n.node); + else do io.write(w, n.node); io.write(w, " "); for n.values { diff --git a/shared/lib/darwin_arm64/lib/libovmwasm.a b/shared/lib/darwin_arm64/lib/libovmwasm.a index 515623ff..fd8ff64d 100644 Binary files a/shared/lib/darwin_arm64/lib/libovmwasm.a and b/shared/lib/darwin_arm64/lib/libovmwasm.a differ