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 · 1 comment

Comments

Projects
None yet
1 participant
@Jos512
Copy link

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

This comment has been minimized.

Copy link
Author

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 Jun 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.