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

templates and SplitFrontMatter do not play nice with windows newline characters #3386

Closed
oganga opened this issue May 10, 2020 · 0 comments · Fixed by #3387
Closed

templates and SplitFrontMatter do not play nice with windows newline characters #3386

oganga opened this issue May 10, 2020 · 0 comments · Fixed by #3387
Labels
bug 🐞 Something isn't working os/windows 🗑️ Windows-specific

Comments

@oganga
Copy link
Contributor

oganga commented May 10, 2020

When on Windows and creating template and Markdown files with native Windows newline the SplitFrontMatter work in an unexpected way.

The Frontmatter is handled correctly due to the extra control character in the Windows newline

@francislavoie francislavoie added bug 🐞 Something isn't working os/windows 🗑️ Windows-specific labels May 10, 2020
mholt added a commit that referenced this issue May 18, 2020
)

* add test case for SplitFrontMatter showing issue with windows newline

* fix issue with windows newline when using SplitFrontMatter

* Update modules/caddyhttp/templates/frontmatter.go

Co-authored-by: Francis Lavoie <lavofr@gmail.com>

* make it mere explicit what is trimmed from firstLine

* Update modules/caddyhttp/templates/frontmatter.go

Co-authored-by: Francis Lavoie <lavofr@gmail.com>
Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 Something isn't working os/windows 🗑️ Windows-specific
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants