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

highlight function adds whitespace (Windows only) #6032

Closed
Jos512 opened this issue Jun 12, 2019 · 2 comments
Closed

highlight function adds whitespace (Windows only) #6032

Jos512 opened this issue Jun 12, 2019 · 2 comments
Labels

Comments

@Jos512
Copy link

Jos512 commented Jun 12, 2019

When I use the built-in highlight function, it adds whitespace. This behaviour is confirmed on the forum, and looks to be Windows-specific only.

It happens with both Firefox and Chrome, and it happens with regular and extended Hugo.

Example

This for instance in a Markdown file:

With `~~~`:

~~~tv
//@version=3
study(title="Pivot indicator", overlay=true)

// Input options
pivOffsetA = input(title="Pivot Offset A", type=integer, defval=7)
pivOffsetB = input(title="Pivot Offset B", type=integer, defval=15)
~~~

With the highlight function:

{{<highlight tv>}}
//@version=3
study(title="Pivot indicator", overlay=true)

// Input options
pivOffsetA = input(title="Pivot Offset A", type=integer, defval=7)
pivOffsetB = input(title="Pivot Offset B", type=integer, defval=15)
{{</highlight>}}

Generates the following output for me on Windows 64-bit:

40ef9a0a512ef89f399db62ad487776534d37756

To replicate

I've made a repository for this issue here: https://github.com/Jos512/hugo-issue-highlight

More information

There's a discussion on the Hugo forum here with more information.


Hugo Static Site Generator v0.55.6/extended windows/amd64 BuildDate: unknown
GOOS="windows"
GOARCH="amd64"
GOVERSION="go1.12.2"
@Jos512
Copy link
Author

Jos512 commented Jun 17, 2019

As reported on the forum:

Check the newline characters in the MD file, and if it’s CRLF, try changing it to LF only.

Indeed the problem gets fixed on my side when I change the newline characters. So not a Hugo issue. 🙂

@Jos512 Jos512 closed this as completed Jun 17, 2019
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 18, 2022
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

1 participant