Skip to content

YAML stringify not support emoji flags. #3689

@arkxfly

Description

@arkxfly

Describe the bug

YAML parse not support emoji flags.

Steps to Reproduce

import * as YAML from "https://deno.land/std@0.203.0/yaml/mod.ts";
const yamlStr = `
country: 🇯🇵
`;

const data = YAML.parse(yamlStr) as any;

console.log(data); // { country: "🇯🇵" }

console.log(YAML.stringify(data)); // country: "\U0001F1EF\U0001F1F5"

image

Expected behavior

support emoji flags.

Environment

deno 1.37.0 (release, x86_64-unknown-linux-gnu)
v8 11.8.172.3
typescript 5.2.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions