Use `"\\%0"` as replacement string to escape chars in Lua rather than function
Open
- Dominant language
- Lua
- Stars
- 80
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
https://github.com/jgm/djot.lua/blob/a0583ef8270d025b3e86ef521b35f7397cf7215b/djot-writer.lua#L17
It is probably more efficient to use `"\\%0"` as the replacement rather than a function. In a replacement string `%0` gets replaced with the whole match, `%1` with the first capture group and so on up to `%9`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.