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

CRLF appears in snippets shipped in MELPA, yasnippet (still) doesn't support CRLF #491

Closed
squid-lee opened this issue Jul 17, 2014 · 3 comments

Comments

@squid-lee
Copy link

I've bumped into either this bug, or a bug like it with the yasnippet release that is 'yasnippet-20140617.1640' in MELPA.

When in HTML mode (which I think is built on NXML), snippets with CRLF get inserted verbatim. When I changed the snippet stored to be strictly unix, the snippet inserted okay.

The snippet in question was the li snippet in NXML mode.

Either yasnippet should accept CRLF files, or it shouldn't ship snippets with CRLF endings.

Cheers

@squid-lee
Copy link
Author

#204 is related

@joaotavora
Copy link
Owner

This is a common problem. The snippet you refer to probably lives in the https://github.com/AndreaCrotti/yasnippet-snippets repo. This problem has to be reported and fixed there (remove the CRLF endings) and then the git submodule has to be updated in yasnippet.

@npostavs, perhaps at least the MELPA recipe should require the yasnippet-snippets package, or maybe the other way around (this has been discussed before).

In the meantime @MrBones118, after you report this is yasnippet-snippets, checking out the latest github head and manually updating the snippets/ submodule should do the trick.

@npostavs
Copy link
Collaborator

The snippet in question was the li snippet in NXML mode.

snippets/nxml-mode/li is indeed stored with DOS line endings, BUT the snippet body doesn't end in a newline DOS or otherwise, and I don't see any CRLF inserted when I expand it. I also tried
snippets/nxml-mode/form which does have DOS newlines in its body, but no CRLFs were inserted from that either.


When in HTML mode (which I think is built on NXML)

FYI, html-mode is based on sgml-mode, and not related to NXML. You may be thinking of nXhtml.

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

3 participants