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

Description removes Windows-style newlines. #28

Closed
warpdesign opened this issue Dec 14, 2017 · 6 comments
Closed

Description removes Windows-style newlines. #28

warpdesign opened this issue Dec 14, 2017 · 6 comments

Comments

@warpdesign
Copy link
Contributor

warpdesign commented Dec 14, 2017

Let's say I have a description like this one:

/**
 * line 1
 *
 * line 2
**/
class foo {
}

If I save the file with Windows line-endings (CRLF), the generated symbol.description will be:

line1line2

Which will end up rendering this description html:

<p>line1line2</p>

If I save the save file with Unix line-endings (LF), the symbol.description will be correct:

line1

line2

Which end up rendering this description html:

<p>line1</p>
<p>line2</p>
@warpdesign warpdesign changed the title Description removes windows-style newlines. Description removes Windows-style newlines. Dec 14, 2017
@onury
Copy link
Owner

onury commented Dec 14, 2017

Can you clone/download the master and try if this resolves the issue?
Or you can replace /lib/web/core.utils.js with this.

I'm not on a PC.

If this resolves, I'll release a patch version.

@warpdesign
Copy link
Contributor Author

You don't need a PC to reproduce the problem: just save one of your js files with Windows line-endings.

VSCode does this, or you could use this command line to convert from Unix to Windows:

sed 's/$'"/echo \\\r/" input.txt > output.txt

(output.txt and input.txt must be different).

@warpdesign
Copy link
Contributor Author

I tested your patch: and it fixes the problem.

@warpdesign
Copy link
Contributor Author

@onury Do you need more information?

@onury
Copy link
Owner

onury commented Dec 20, 2017

nope. I was just busy. Sorry for the wait. Released.

@onury onury closed this as completed Dec 20, 2017
@warpdesign
Copy link
Contributor Author

No need to be sorry :) Thanks!

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

No branches or pull requests

2 participants