forked from AFPy/pospell
1
0
Fork 0

FIX: Discrepancy between docutils rst and sphinx rst

:rfc: don't allow aliases in docutils implementation.

See: https://sourceforge.net/p/docutils/feature-requests/75/
This commit is contained in:
Julien Palard 2023-07-21 09:05:52 +02:00
parent a626a2f3fb
commit 8b753bde26
Signed by: mdk
GPG Key ID: 0EFC1AC1006886F8
2 changed files with 9 additions and 7 deletions

View File

@ -1,30 +1,30 @@
"""pospell is a spellcheckers for po files containing reStructuedText."""
import io
from string import digits
from unicodedata import category
import collections
import functools
import io
import logging
import multiprocessing
import os
import subprocess
import sys
from typing import List, Tuple
from contextlib import redirect_stderr
from itertools import chain
from pathlib import Path
from shutil import which
from string import digits
from typing import List, Tuple
from unicodedata import category
import docutils.frontend
import docutils.nodes
import docutils.parsers.rst
import polib
import regex
from docutils.parsers.rst import roles
from docutils.utils import new_document
from sphinxlint import rst
import regex
__version__ = "1.2"
__version__ = "1.3"
DEFAULT_DROP_CAPITALIZED = {"fr": True, "fr_FR": True}
@ -138,6 +138,7 @@ def strip_rst(line):
if line.endswith("::"):
# Drop :: at the end, it would cause Literal block expected
line = line[:-2]
line = rst.NORMAL_ROLE_RE.sub("", line)
settings = docutils.frontend.get_default_settings()
settings.pep_references = None
settings.rfc_references = None

View File

@ -29,6 +29,7 @@ dependencies = [
"polib",
"docutils>=0.18",
"regex",
"sphinx-lint>=0.6.8",
]
dynamic = [
"version",