Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yaml parsing does not work #60

Open
kyeotic opened this issue Apr 30, 2023 · 0 comments · May be fixed by #96
Open

yaml parsing does not work #60

kyeotic opened this issue Apr 30, 2023 · 0 comments · May be fixed by #96

Comments

@kyeotic
Copy link

kyeotic commented Apr 30, 2023

I am able to successfully parse and highlight other languages, but yaml does not parse correctly. It parses "successfully", but the output is missing important decoration. The most visible issue is that key's are not marked as such.

Example Markdown (Ignore the slash, it is needed to stop github from breaking here, but the actual examples are valid)

\```yaml
name: test
checks:
    prop: "a"
    list:
        - first
        - second
\```

Expected Output

Here is an example from the prism playground. The output has keys marked with a key class

image

Actual Output

However, this library does not apply that class.

Example Code:

import { serve } from "https://deno.land/std@0.177.0/http/server.ts";
import { default as html } from "https://deno.land/x/htm@0.1.3/html.tsx";
import { render } from "https://deno.land/x/gfm/mod.ts";
import 'https://esm.sh/prismjs@1.27.0/components/prism-yaml'


const markdown = `
# Demo

A YAML parsing Test

\`\`\`yaml
name: test
checks:
    prop: "a"
    list:
        - first
        - second
\`\`\`
`;

serve((req: Request) => html(render(markdown)));

Links:

image

Notice the missing key class. Without this, the highlighting is missing nearly all colors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant