-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
Labels
Description
Describe the bug
Suppose we have the following Markdown file:
Some info with two images:



Note that it uses two spaces at the end of the lines to produce line breaks:
Some info with two images:<SPACE><SPACE>
<SPACE><SPACE>

When gettext
generates .po
files for this document, it seems that it ignores the line breaks and threats everything as a single paragraph:
#: ../source/test.md:1
msgid "Some info with two images:  "
msgstr ""
However, I would expect the lines to be separated:
#: ../source/test.md:1
msgid "Some info with two images:"
msgstr ""
#: ../source/test.md:3
msgid ""
msgstr ""
#: ../source/test.md:5
msgid ""
msgstr ""
How to Reproduce
Run python3 -m sphinx -b gettext source/ build/
for source/test.md
:
Some info with two images:


build/test.pot
will have the following:
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2023, test
# This file is distributed under the same license as the test package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: test \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-10-26 10:44+0900\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../source/test.md:1
msgid "Some info with two images:  "
msgstr ""
Environment Information
Platform: linux; (Linux-6.1.0-0.deb11.7-amd64-x86_64-with-glibc2.31)
Python version: 3.9.2 (default, Feb 28 2021, 17:03:44)
[GCC 10.2.1 20210110])
Python implementation: CPython
Sphinx version: 5.3.0
Docutils version: 0.17.1
Jinja2 version: 2.10.3
Sphinx extensions
extensions = []
Additional context
No response