hugo/common
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
..
collections Implement defer 2024-06-23 11:25:47 +02:00
constants Emit a warning that can be turned off when overwriting built-in .Params values 2024-01-30 20:12:03 +01:00
hashing Shorten processed image filenames 2024-07-31 16:44:06 +02:00
hcontext all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
herrors Implement defer 2024-06-23 11:25:47 +02:00
hexec Add css.TailwindCSS 2024-06-25 15:48:02 +02:00
hreflect resources/page: Expand parmalinks tokens in url 2024-08-01 12:14:29 +02:00
hstrings Add Luminance to Color 2024-04-16 10:02:46 +02:00
htime all: Run gofumpt -l -w . 2024-01-28 23:14:09 +01:00
hugio Add build time math rendering 2024-08-09 17:18:37 +02:00
hugo releaser: Prepare repository for 0.132.0-DEV 2024-08-02 09:18:21 +00:00
loggers Consolidate all hashing to the common/hashing package 2024-07-31 16:44:06 +02:00
maps resources/page: Expand parmalinks tokens in url 2024-08-01 12:14:29 +02:00
math all: gofmt -w -r 'interface{} -> any' . 2022-03-17 22:03:27 +01:00
para common/para: Skip flaky test on CI 2023-11-28 12:23:38 +01:00
paths Implement defer 2024-06-23 11:25:47 +02:00
predicate Add a HTTP cache for remote resources. 2024-06-04 16:07:39 +02:00
rungroup all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
tasks Add a HTTP cache for remote resources. 2024-06-04 16:07:39 +02:00
terminal all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
text all: Run gofumpt -l -w . 2024-01-28 23:14:09 +01:00
types Improve Katex error handling and fix handling of large expressions 2024-08-12 13:50:18 +02:00
urls all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
docs.go Misc doc, code refactoring to improve documentation 2023-01-04 18:01:26 +01:00