diff options
-rw-r--r-- | _exts/typescriptdomain.py | 27 | ||||
-rw-r--r-- | conf.py | 2 | ||||
-rw-r--r-- | frags/README.md | 6 | ||||
-rw-r--r-- | frags/using-taler-config.rst | 3 | ||||
-rw-r--r-- | taler-auditor-manual.rst | 4 | ||||
-rw-r--r-- | taler-exchange-manual.rst | 2 | ||||
-rw-r--r-- | taler-merchant-manual.rst | 2 |
7 files changed, 31 insertions, 15 deletions
diff --git a/_exts/typescriptdomain.py b/_exts/typescriptdomain.py index 68777645..83ab26c6 100644 --- a/_exts/typescriptdomain.py +++ b/_exts/typescriptdomain.py @@ -8,6 +8,8 @@ TypeScript domain. import re +from pathlib import Path + from docutils import nodes from typing import List, Optional, Iterable, Dict, Tuple from typing import cast @@ -405,6 +407,8 @@ class LinkingHtmlFormatter(HtmlFormatter): ): return value + if self._bridge.docname is None: + return value if xref is None: return value content = caption if caption is not None else value @@ -509,10 +513,15 @@ class MyPygmentsBridge(PygmentsBridge): def highlight_block( self, source, lang, opts=None, force=False, location=None, **kwargs ): - docname, line = location - self.line = line - self.path = self.builder.env.doc2path(docname) - self.docname = docname + if isinstance(location, tuple): + docname, line = location + self.line = line + self.path = self.builder.env.doc2path(docname) + self.docname = docname + elif isinstance(location, Element): + self.line = location.line + self.path = location.source + self.docname = Path(location.source).stem return super().highlight_block(source, lang, opts, force, location, **kwargs) @@ -567,8 +576,12 @@ literal_reg = re.compile(r"``([^`]+)``") def setup(app): - lexer = BetterTypeScriptLexer() - lexer.add_filter(LinkFilter(app)) - app.add_lexer("tsref", lexer) + + class TsrefLexer(BetterTypeScriptLexer): + def __init__(self, **options): + super().__init__(**options) + self.add_filter(LinkFilter(app)) + + app.add_lexer("tsref", TsrefLexer) app.add_domain(TypeScriptDomain) app.add_builder(MyHtmlBuilder) @@ -100,7 +100,7 @@ release = '0.8.0pre0' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. -exclude_patterns = ['_build', '_exts', 'cf', 'prebuilt'] +exclude_patterns = ['_build', '_exts', 'cf', 'prebuilt', '**/README.md'] # The reST default role (used for this markup: `text`) to use for all # documents. diff --git a/frags/README.md b/frags/README.md index 0fe7923f..5070c7f1 100644 --- a/frags/README.md +++ b/frags/README.md @@ -10,3 +10,9 @@ If the fragment includes header lines, you MUST include it at top-level Otherwise, it can be included at either top-level or indented. See <https://docutils.sourceforge.io/docs/ref/rst/directives.html#including-an-external-document-fragment>. + +Tips: + +- Don't put index entries in frags/* files. + (They will result in a Sphinx warning.) + Instead, keep them in the *including* text. diff --git a/frags/using-taler-config.rst b/frags/using-taler-config.rst index d7c28b23..c15df84b 100644 --- a/frags/using-taler-config.rst +++ b/frags/using-taler-config.rst @@ -1,5 +1,3 @@ -.. _Using-taler_002dconfig-exchange: - Using taler-config ------------------ @@ -50,4 +48,3 @@ While the configuration file is typically located at ``$HOME/.config/taler.conf``, an alternative location can be specified to ``taler-merchant-httpd`` and ``taler-config`` using the ``-c`` option. - diff --git a/taler-auditor-manual.rst b/taler-auditor-manual.rst index 34c21430..52959c89 100644 --- a/taler-auditor-manual.rst +++ b/taler-auditor-manual.rst @@ -523,11 +523,11 @@ several categories of failures of different severity: impact. - Inconsistencies in the data that show that the exchange - made an unexpected loss (such as accepting a coin for + experienced an unexpected financial loss (such as accepting a coin for deposit with an invalid signature). - Inconsistencies in the data that show that the exchange - caused some other party to make a loss (such as not wiring + caused some other party to experience a financial loss (such as not wiring the correct amount to a merchant). - Configuration issues (such was wire fees unavailable). diff --git a/taler-exchange-manual.rst b/taler-exchange-manual.rst index 468950b0..0aab7c02 100644 --- a/taler-exchange-manual.rst +++ b/taler-exchange-manual.rst @@ -301,6 +301,8 @@ of some of the options. .. include:: frags/configuration-format.rst +.. _Using-taler_002dconfig-exchange: + .. include:: frags/using-taler-config.rst diff --git a/taler-merchant-manual.rst b/taler-merchant-manual.rst index 9331c284..fda75bb8 100644 --- a/taler-merchant-manual.rst +++ b/taler-merchant-manual.rst @@ -297,8 +297,6 @@ backend: - libargon2 >= 20171227 (GNUnet 0.13 needs it to build, not actively used by GNU Taler) -- libsqlite3 >= 3.0 (GNUnet 0.13 needs it to build, not actively used by GNU Taler) - - libjansson >= 2.7 - Postgres >= 9.6, including libpq |