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

Cross-platform line break support #9

Closed
kevinswiber opened this issue Sep 6, 2017 · 5 comments
Closed

Cross-platform line break support #9

kevinswiber opened this issue Sep 6, 2017 · 5 comments

Comments

@kevinswiber
Copy link
Contributor

For this particular case, require('os').EOL should be used instead of the constant LINE_SEPERATOR, which has a value of \n.

yawn-yaml/src/index.js

Lines 317 to 320 in d870fbe

return yaml.substr(0, getNodeEndMark(node).pointer) +
LINE_SEPERATOR +
indentedValue +
yaml.substring(getNodeEndMark(node).pointer);

@mohsen1
Copy link
Owner

mohsen1 commented Sep 6, 2017

Good idea! PR is welcome!

@kevinswiber
Copy link
Contributor Author

As I'm building on top of this project, I'm cataloguing some of the issues. When I get a breather, I'll be happy to submit PRs!

kevinswiber added a commit to kevinswiber/yawn-yaml that referenced this issue Sep 14, 2017
@kevinswiber
Copy link
Contributor Author

Hey, @mohsen1, it looks like the contents of dist and cjs weren't built before this was published. Still having issues, unfortunately. 😬

@mohsen1
Copy link
Owner

mohsen1 commented Sep 14, 2017

Oops sorry! Fixing it right now!

@mohsen1
Copy link
Owner

mohsen1 commented Sep 14, 2017

Done in yawn-yaml@1.3.2

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