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

Incorrect link detection in doc comments #407

Open
Booksbaum opened this issue Apr 11, 2021 · 0 comments
Open

Incorrect link detection in doc comments #407

Booksbaum opened this issue Apr 11, 2021 · 0 comments
Labels

Comments

@Booksbaum
Copy link
Contributor

/**
 * [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?)

@Booksbaum Booksbaum added the bug label Apr 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant