Merge pull request #2755 from quaepoena/zero-width-spaces

Replace zero-width spaces in man pages with an empty string.
This commit is contained in:
Dirk-Jan C. Binnema
2024-09-05 05:46:09 +03:00
committed by GitHub

View File

@ -80,10 +80,16 @@ foreach src : man_orgs
configure_file(input: src, output:'@BASENAME@.org',
configuration: conf_data)
# (replace-regexp-in-string) removes zero-width spaces — added for
# text formatting purposes by the man-link macro — from the
# resulting man page.
expr_tmpl = ''.join([
'(progn',
' (require \'ox-man)',
' (setq org-export-with-sub-superscripts \'{})',
' (add-to-list \'org-export-filter-plain-text-functions',
' (lambda (text _backend _info)',
' (replace-regexp-in-string "\u200b" "" text)))',
' (org-export-to-file \'man "@0@"))'])
expr = expr_tmpl.format(org.substring(0,-4))
sectiondir = join_paths(mandir, 'man' + section)