Open bpj opened 6 months ago
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.
"\\%0"
%0
%1
%9
True. Feel free to submit a PR.
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
.