Skip to content

Block comments don't get created as a "block" and don't continue on new lines #9480

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

Closed
josh-endries opened this issue Jul 1, 2016 · 2 comments
Labels
In Discussion Not yet reached consensus Suggestion An idea for TypeScript Visual Studio Integration with Visual Studio

Comments

@josh-endries
Copy link

TypeScript Version: 1.8.30

Code

/*

Or:

/**

Expected behavior:

/*
 * <cursor>
 */

The /** variant works correctly here, but not with the next step.

And, after pressing Enter:

/*
 *
 * <cursor>
 */

Actual behavior:

/*
<cursor>

(Your template has no "description" section, which seems valuable. I'm adding one. Here it comes!)

Description:

I'm not really sure if this belongs here or maybe here, but this doesn't work in VS "14.0.25123.00 Update 2" with TS or TSX or JSX files. It's impressively annoying. It does work with JS.

When initially adding a block comment, it doesn't fill in the "blank" line with just a <indent> * prefix (note the space), and upon pressing enter, it doesn't insert the <indent> * for the new line as a continuation of the comment.

The "doc" code block format (/**) starts out correctly, adding a single * line and closing */ line and placing the cursor on the single * line, however when adding a new line it doesn't prefix the line with <indent> * as I would expect. Virtually every other editor I've used (that I can remember) does block comments this way, so I don't think my expectation is unwarranted, but maybe so...

@DanielRosenwasser
Copy link
Member

We do auto-fill for the second star on /** if the following thing can be JSDoc'd (see some of the checklist on #4447). That said, I don't remember if there's a good reason why we don't always fill in the comment.

Adding a new * when pressing enter in a multi-line comment is something we were looking at but I can't find the issue tracking it.

@DanielRosenwasser DanielRosenwasser added Suggestion An idea for TypeScript Visual Studio Integration with Visual Studio In Discussion Not yet reached consensus labels Jul 1, 2016
@RyanCavanaugh
Copy link
Member

This has been fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
In Discussion Not yet reached consensus Suggestion An idea for TypeScript Visual Studio Integration with Visual Studio
Projects
None yet
Development

No branches or pull requests

3 participants