You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm seeing angled brackets <> that are not being used in a HTML context still be stripped, and have been unable to figure out how to properly escape them.
Minimal reproduction
I'm running this command (the OpenAPI spec is a public link):
I expect the z.infer to have the <typeof xyz_schema_name> present.
Additional context
This started happening a few months back and I haven't been able to nail down why, as it used to work.
The text was updated successfully, but these errors were encountered:
andenacitelli
changed the title
Can't figure out how to escape angled brackets <>
Can't figure out how to escape angled brackets <> w/ Handlebars
Jul 29, 2024
i'm just now also running into this same problem. There's something wonky about how it processes the handlebars template. it's like it sees it as an html tag no matter what I do. I can put some \ and it will output it, but it doesn't treat it like an escape character (also prints \). Sometimes I really hate handlebars for how confining it is.
so, it looks like it has to do with the prettier config. It seems to pick up whatever you have locally. When I removed mine (which works just fine for me) it started working. Here's my prettier config.
// ./.prettierrc.cjsmodule.exports={singleQuote: true,semi: false,plugins: ['@trivago/prettier-plugin-sort-imports'],importOrder: ['<THIRD_PARTY_MODULES>','^@banno/(.*)$','^[./]'],// for @trivago/prettier-plugin-sort-importsimportOrderSeparation: true,// for @trivago/prettier-plugin-sort-importsimportOrderSortSpecifiers: true,// for @trivago/prettier-plugin-sort-imports}
if I delete it, the generated output is fine. (for me) there's something about having this particular plugin there. Things work if I remove it. It seems to pick up the prettier config if it exists at all. The option to pass a prettier config is just overrides (i think) as it seems to keep using my default one). The code seems to make heavy use of pretty formatting everything. I may need to rename it to a non-default one.
Describe the bug
I'm seeing angled brackets
<>
that are not being used in a HTML context still be stripped, and have been unable to figure out how to properly escape them.Minimal reproduction
I'm running this command (the OpenAPI spec is a public link):
With this Handlebars template:
But I'm seeing the
<typeof ...>
part seemingly get treated as HTML-related and wiped by the Handlebars process. This is what it looks like:Expected behavior
I expect the
z.infer
to have the<typeof xyz_schema_name>
present.Additional context
This started happening a few months back and I haven't been able to nail down why, as it used to work.
The text was updated successfully, but these errors were encountered: