You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As discussed in this thread on hugo's discourse board:
I'm using this passthrough render hook to render equations using function transform.toMath:
{{- with try (transform.ToMath .Inner ) }}
{{- with .Err }}
{{ errorf "KaTeX: %s: see %s." . $.Position }}
{{- else }}
{{- .Value }}
{{- end }}
{{- end -}}
With an invalid syntax given for the TeX content to rendered, I'm getting:
ERROR KaTeX: template: _default/_markup/render-passthrough.html:1:23:
executing "_default/_markup/render-passthrough.html" at <transform.ToMath>:
error calling ToMath: KaTeX parse error: Undefined control sequence:
\foo at position 1: \̲f̲o̲o̲:
see "/path/to/site/content/lang/section/subsection/index.md:0:1".
Bug
The position given in the last line is always 0:1, regardless of the actual position of the offending code in the source file.
Test of render hooks
As requested in the discourse thread, I tested all available render hooks, this is the result:
Render hook
Context has Position
Position correct
Block quote
yes
yes
Code blocks
yes
yes
Headings
no
-
Images
no
-
Links
no
-
Pass through
yes
no
Table
yes
no
What version of Hugo are you using (hugo version)?
$ hugo version
hugo v0.144.0-DEV-9c2f8ec61beb9521fb606848de2d14aa180facd7+extended linux/amd64
Does this issue reproduce with the latest release?
Yes.
The text was updated successfully, but these errors were encountered:
As discussed in this thread on hugo's discourse board:
I'm using this passthrough render hook to render equations using function
transform.toMath
:With an invalid syntax given for the TeX content to rendered, I'm getting:
Bug
The position given in the last line is always
0:1
, regardless of the actual position of the offending code in the source file.Test of render hooks
As requested in the discourse thread, I tested all available render hooks, this is the result:
What version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
Yes.
The text was updated successfully, but these errors were encountered: