hugo/tpl/internal/go_templates
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
..
cfg Go 1.21 Upgrade 2023-08-23 21:49:27 +02:00
fmtsort Upgrade to Go 1.22.1 2024-03-15 16:40:36 +01:00
htmltemplate Improve Katex error handling and fix handling of large expressions 2024-08-12 13:50:18 +02:00
testenv tpl: Sync Go template packages with the Go 1.22.5 source 2024-08-01 12:07:27 +02:00
texttemplate Bump to go 1.21 in go.mod 2024-08-01 12:07:27 +02:00
staticcheck.conf all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00