Skip to content

fix: only parse arguments from first line of tag comment #1650

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

Merged
merged 1 commit into from
Jul 17, 2025

Conversation

aabajyan
Copy link
Contributor

I had this issue, where I was trying to use customName annotation to rename methods and I noticed that it was also including a new line and the first word of the next line. For example:

/** @noSelf */
declare namespace TestNamespace {
    /**
     * @customName pass
     * The first word should not be included.
     **/
    function fail(): void;
}

TestNamespace.fail();

Would result in:

TestNamespace["pass\nThe"]()

The solution was pretty simple, I only had to get the first line before splitting it by space.
I ran the tests and everything passes. Let me know if there's other changes I need to make.

@Zamiell
Copy link
Contributor

Zamiell commented Jul 16, 2025

nice work!

@Perryvw Perryvw merged commit 102a00a into TypeScriptToLua:master Jul 17, 2025
5 checks passed
@aabajyan aabajyan deleted the fix-tag-first-line branch July 29, 2025 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy