Skip to content

oxfmt/jsdoc: code syntax brackets are not preserved #21550

@Mister-Hope

Description

@Mister-Hope

This issue is similar to #19137

That issue fix complex code block parsing in oxlint jsdoc plugin, but oxfmt's new jsdocs plugin also has similar issues:

Before:

/**
 * `` ```js /Hello|Hi/ ``
 *
 * Meta word highlight
 *
 * 元词汇高亮
 *
 * @param parser - Code parser instance / 代码解析器实例
 * @param meta - Meta string / 元字符串
 */
Image

With jsdoc: true (oxfmt without it works fine), the formatted code becomes:

/**
 * ````js /Hello|Hi/`
 *
 * Meta word highlight
 *
 * 元词汇高亮
 *
 * @param parser - Code parser instance / 代码解析器实例
 * @param meta - Meta string / 元字符串
 */
Image

This breaks the original jsdoc

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Priority

    None yet

    Effort

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions