Bug 269679 - AsciiDoc text replacement: monospace non-escaped `--` rendered as — (em dash)
Summary: AsciiDoc text replacement: monospace non-escaped `--` rendered as — (em dash)
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Books & Articles (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Graham Perrin
URL: https://docs.asciidoctor.org/asciidoc...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-19 11:09 UTC by Graham Perrin
Modified: 2023-02-20 08:04 UTC (History)
1 user (show)

See Also:


Attachments
Screenshot: presentation as an em dash (32.94 KB, image/png)
2023-02-19 11:09 UTC, Graham Perrin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Graham Perrin freebsd_committer freebsd_triage 2023-02-19 11:09:06 UTC
Created attachment 240257 [details]
Screenshot: presentation as an em dash

Example
=======


<https://gitlab.com/FreeBSD/freebsd-doc/-/blob/ec766c17ddb459e73e79027ca844392c0ba6359e/documentation/content/en/books/developers-handbook/tools/_index.adoc?plain=1#L887> ends with: 

> type `lldb -c _progname_.core -- _progname_`

<https://docs.freebsd.org/en/books/developers-handbook/tools/#_examining_a_core_file_with_lldb> displays: 

> type lldb -c progname.core — progname
Comment 1 commit-hook freebsd_committer freebsd_triage 2023-02-19 18:57:11 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/doc/commit/?id=7045e0a4f4293b805c2bddd677a31907bd434f21

commit 7045e0a4f4293b805c2bddd677a31907bd434f21
Author:     Graham Perrin <grahamperrin@FreeBSD.org>
AuthorDate: 2023-02-19 18:42:27 +0000
Commit:     Graham Perrin <grahamperrin@FreeBSD.org>
CommitDate: 2023-02-19 18:42:27 +0000

    AsciiDoc text replacement: non-escaped ' -- '

    https://docs.asciidoctor.org/asciidoc/latest/syntax-quick-reference/#text-replacements
    notes that text replacement may occur where

     --

    – is between two word characters, between a word character and a
    line boundary, or flanked by spaces. The replacement:

     —

    – an em dash.

    The ripgrep command below helped to identify two editions of the
    FreeBSD Developers' Handbook in which an escape charater was required.

    rg '`.* -- .*`' /usr/doc

    Whilst here: full stops, and one sentence per line for the affected
    subsection of the zh-tw translation of the book.

    https://bugs.freebsd.org/269679
    PR:                      269679
    Pull request: https://github.com/freebsd/freebsd-doc/pull/113

 .../en/books/developers-handbook/tools/_index.adoc       |  2 +-
 .../zh-tw/books/developers-handbook/tools/_index.adoc    | 16 ++++++++++++----
 2 files changed, 13 insertions(+), 5 deletions(-)