Skip to content

Commit

Permalink
Merge pull request #2755 from quaepoena/zero-width-spaces
Browse files Browse the repository at this point in the history
Replace zero-width spaces in man pages with an empty string.
  • Loading branch information
djcb authored Sep 5, 2024
2 parents 37bb5fe + 0282c85 commit 8ac97ac
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions man/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8ac97ac

Please sign in to comment.