blob: 48a8fb52bed78204758f8d2385e94901146c0411 (
plain)
- -- Avoid linebreak before lone percentage sign
- function Para(el)
- for i = 1, #el.content - 1 do
- if el.content[i].t == "Space" then
- local el_next = el.content[i + 1]
- if el_next and el_next.t == "Str" and el_next.text == "%" then
- el.content[i] = pandoc.Str("\u{00A0}") -- Non-breaking space
- end
- end
- end
- return el
- end
|