gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-docs] 02/02: address lexer API warning


From: gnunet
Subject: [taler-docs] 02/02: address lexer API warning
Date: Mon, 14 Dec 2020 14:21:20 +0100

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository docs.

commit 23405a23bd2771cb4c1c22f942a974e836531f77
Author: Florian Dold <florian@dold.me>
AuthorDate: Mon Dec 14 14:21:13 2020 +0100

    address lexer API warning
---
 _exts/typescriptdomain.py | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/_exts/typescriptdomain.py b/_exts/typescriptdomain.py
index 0f08fff..83ab26c 100644
--- a/_exts/typescriptdomain.py
+++ b/_exts/typescriptdomain.py
@@ -576,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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]