Skip to content

Incorrect link detection in doc comments #407

Open
@Booksbaum

Description

@Booksbaum
/**
 * [title](link) some text (in brackets)
 */
export interface I {}

==>

/// <summary><see cref="link) some text (in brackets">title</see></summary>
type [<AllowNullLiteral>] I =
    interface end

seems like error in regex: greedy, instead of lazy.
But lazy would probably cause issues when link contains brackets and would match these.

And probably further issue:
doesn't recognize escaped chars:

/**
 * [title](li\)nk) some text
 */
export interface I {}

==>

/// <summary><see cref="li\)nk">title</see> some text</summary>
type [<AllowNullLiteral>] I =
    interface end

link shouldn't contain \.

And most likely even more stuff that's not great or easy with just regex. (-> use a real markdown/jsdoc parser?)

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