hugo/tpl
Bjørn Erik Pedersen e1e1baa1bd Improve Katex error handling and fix handling of large expressions
* Make throwOnError=true the new default
* Handle JS errors as part of the RPC request/response flow
* Return a new Result type with .Err on it

This enables constructs on the form:

```handlebars
{{ with transform.ToMath "c = \\foo{a^2 + b^2}" }}
	{{ with .Err }}
	 	{{ warnf "error: %s" . }}
	{{ else }}
		{{ . }}
	{{ end }}
{{ end }}
```

Note that the new `Result` type behaves like `template.HTML` (or a string if needed) when printed, but it will panic if in a error state.

Closes #12748
2024-08-12 13:50:18 +02:00
..
cast tpl/cast: Improve float 2024-08-06 22:26:43 +02:00
collections Skip TestEchoParam 2024-08-06 19:13:35 +02:00
compare Fix compare of uints and ints in eq, gt etc. 2024-08-10 14:00:21 +02:00
crypto
css
data Consolidate all hashing to the common/hashing package 2024-07-31 16:44:06 +02:00
debug
diagrams
encoding
fmt
hash
hugo
images
inflect
internal Improve Katex error handling and fix handling of large expressions 2024-08-12 13:50:18 +02:00
js
lang
math
openapi
os
page
partials Consolidate all hashing to the common/hashing package 2024-07-31 16:44:06 +02:00
path
reflect
resources Shorten processed image filenames 2024-07-31 16:44:06 +02:00
safe
site
strings
templates resources/page: Expand parmalinks tokens in url 2024-08-01 12:14:29 +02:00
time
tplimpl
transform Improve Katex error handling and fix handling of large expressions 2024-08-12 13:50:18 +02:00
urls
template.go
template_info.go
template_test.go