Skip to content
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

Use hyphens instead of en dashes for unordered lists #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Gelio
Copy link

@Gelio Gelio commented Apr 18, 2021

Unordered lists in the English version of the book were marked with en dashes (–), instead of hyphens (-). Those do not produce real unordered lists but are treaded in Markdown as a single paragraph.

The conversion was done using the following command:

rg '^–' -g '*.md' --files-with-matches | xargs sed -i 's/^–/-/g'

which uses https://github.com/BurntSushi/ripgrep

The problem occurred only in the English version of the book. Other languages already used hyphens. I assume this may be because the app @michaelnozbe is using to write the original version of the book may automatically convert en dashes to hyphens 🙂 It would probably be nice to add a GitHub Action or some other commit check that would verify that rg '^–' -g '*.md' --files-with-matches returns no results 😄

Pages affected

You can find on these pages to see the incorrectly rendered lists:

  1. https://nooffice.org/customers/
  2. https://nooffice.org/decide/
  3. https://nooffice.org/friday/
  4. https://nooffice.org/lean/
  5. https://nooffice.org/pay/
  6. https://nooffice.org/reunion/
  7. https://nooffice.org/vlog/
  8. https://nooffice.org/week/

Example fix

https://nooffice.org/lean/

Before (original):
image

After:
image

Unordered lists in the English version of the book were marked with
en dashes (–), instead of hyphens (-). Those do not produce real
unordered lists, but are treaded in Markdown as a single paragraph.

Conversion was done using the following command:
rg '^–' -g '*.md' --files-with-matches | xargs sed -i 's/^–/-/g'
which uses ripgrep.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant