Skip to content
This repository has been archived by the owner on Jan 19, 2019. It is now read-only.

Line comments strip /**/ #256

Closed
azz opened this issue May 6, 2017 · 2 comments
Closed

Line comments strip /**/ #256

azz opened this issue May 6, 2017 · 2 comments
Assignees
Labels

Comments

@azz
Copy link
Contributor

azz commented May 6, 2017

What version of TypeScript are you using?

2.3.2

What version of typescript-eslint-parser are you using?

a294afa

What code were you trying to parse?

// /*test*/

What did you expect to happen?

comments: [ { type: 'Line', value: ' /*test*/', ...} ]

What happened?

comments: [ { type: 'Line', value: ' test', ... } ]

prettier/prettier#1480

@soda0289
Copy link
Member

soda0289 commented May 6, 2017

When parsing comments we currently strip out all comment indicators:
https://github.com/eslint/typescript-eslint-parser/blob/master/parser.js#L226

I will have to look into why this is the case. I think it might be better to just strip the // from the begging of a line comment. And strip /* and */ from a multiline comment but keeping all other characters.

@soda0289
Copy link
Member

soda0289 commented May 6, 2017

I'm going to fix this in: #219

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants