google / mdbook-i18n-helpers

Translation support for mdbook. The plugins here give you a structured way to maintain a translated book.
Apache License 2.0
127 stars 25 forks source link

Test `extract_messages` with backslashes #108

Closed mgeisler closed 10 months ago

mgeisler commented 10 months ago

This is part of #105, the test demonstrates how we extract backslashes: \ (a single backslash) in the Markdown file becomes \\ (a backslash-escaped backslash) afterwards.

This is consistent with the Commonmark spec, which says that a backslash-escaped backslash is how you can represent a backslash in the document: https://spec.commonmark.org/0.30/#backslash-escapes.

However, it can lead to problems if the LaTeX preprocessor doesn’t handle \\ in the Markdown file as a \.