hugo/common/types
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
..
css all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
hstring all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
closer.go Add a HTTP cache for remote resources. 2024-06-04 16:07:39 +02:00
convert.go all: Run gofumpt -l -w . 2024-01-28 23:14:09 +01:00
convert_test.go all: Run gofumpt -l -w . 2024-01-28 23:14:09 +01:00
evictingqueue.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
evictingqueue_test.go tests: Convert from testify to quicktest 2019-08-12 13:26:32 +02:00
types.go Improve Katex error handling and fix handling of large expressions 2024-08-12 13:50:18 +02:00
types_test.go all: gofmt -w -r 'interface{} -> any' . 2022-03-17 22:03:27 +01:00