Skip to content

Self-Test: Ignore width space after em dash #654

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions integtest/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ check: \
style \
minimal_expected_files minimal_same_files \
includes_expected_files includes_same_files \
emdash_expected_files emdash_same_files \
beta_expected_files beta_same_files \
experimental_expected_files experimental_same_files \
readme_expected_files readme_same_files \
Expand Down
5 changes: 5 additions & 0 deletions integtest/emdash.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
= Title

== Chapter

I have an em dash between some--words.
4 changes: 4 additions & 0 deletions integtest/html_diff
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ def normalize_html(html):
# Remove the zero width space that asciidoctor adds after each horizontal
# ellipsis. They don't hurt anything but asciidoc doesn't make them
html = html.replace('\u2026\u200b', '\u2026')
# Remove the zero width space that asciidoctor adds after each em dash that
# is between words. They are actively nice to have but asciidoc doesn't
# make them.
html = html.replace('\u2014\u200b', '\u2014')
# Temporary workaround for known issues
html = re.sub(
r'(?m)^\s+<div class="console_widget" data-snippet="[^"]+">'
Expand Down