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

Codeblocks are not handled correctly in toml parser #703

Closed
xhyrom opened this issue Jul 14, 2022 · 3 comments
Closed

Codeblocks are not handled correctly in toml parser #703

xhyrom opened this issue Jul 14, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@xhyrom
Copy link
Collaborator

xhyrom commented Jul 14, 2022

Version

0.1.4

Platform

Microsoft Windows NT 10.0.25151.0 x64 | Linux LAPTOP-J5PF3D19 5.10.102.1-microsoft-standard-WSL2 #1 SMP Wed Mar 2 00:30:59 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

What steps will reproduce the bug?

  1. Create xx.toml
  2. Add codeblock to xx.toml:
[test]
content = """
\`\`\`js
console.log('Hello, bun!');
\`\`\`
"""

without \ but github would change it to codeblock

How often does it reproduce? Is there a required condition?

Always, printer bug

What is the expected behavior?

Loading a file with codeblock:

image

What do you see instead?

SyntaxError: Invalid escape in identifier: '\'

image

Additional information

Jarred: https://canary.discord.com/channels/876711213126520882/887787428973281300/997060743348375583

@xhyrom xhyrom added bug Something isn't working needs repro Needs an example to reproduce labels Jul 14, 2022
@jlandrum
Copy link

This is not an issue with bun or toml.
If you want \` to be in the output, you need to escape the escape with \\` otherwise if your intent is to just have the `, it does not need to be escaped.

@xhyrom
Copy link
Collaborator Author

xhyrom commented Jul 15, 2022

This is not an issue with bun or toml. If you want \` to be in the output, you need to escape the escape with \\` otherwise if your intent is to just have the `, it does not need to be escaped.

This is an issue with bun. content is a string, so you don't need to escaping. I tried it with one npm package, with which it works perfectly fine.

Check https://canary.discord.com/channels/876711213126520882/887787428973281300/997060743348375583

@Electroid Electroid removed the needs repro Needs an example to reproduce label Nov 2, 2022
@Electroid Electroid changed the title TOML - codeblocks Codeblocks are not handled correctly in toml parser Nov 2, 2022
@RiskyMH
Copy link
Contributor

RiskyMH commented Oct 12, 2024

We've invested a ton of time into making Bun more reliable over the last year. I'm having a really hard time reproducing this. @xhyrom if you're still running into this issue, please let me know and I'll re-open this.

@RiskyMH RiskyMH closed this as completed Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants