[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-docs] branch master updated (1c03dae -> 23405a2)
From: |
gnunet |
Subject: |
[taler-docs] branch master updated (1c03dae -> 23405a2) |
Date: |
Mon, 14 Dec 2020 14:21:18 +0100 |
This is an automated email from the git hooks/post-receive script.
dold pushed a change to branch master
in repository docs.
from 1c03dae guard against API change in new Sphinx version
new 51a5a7f re-enable highlightling for newer Sphinx
new 23405a2 address lexer API warning
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
_exts/typescriptdomain.py | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/_exts/typescriptdomain.py b/_exts/typescriptdomain.py
index f9af1b0..83ab26c 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
@@ -516,6 +518,10 @@ class MyPygmentsBridge(PygmentsBridge):
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)
@@ -570,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)
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-docs] branch master updated (1c03dae -> 23405a2),
gnunet <=