Le 25/05/2022 à 19:23, Dan Sandberg a écrit :
Hi Jean,
Thanks for the reply. I saw that, but how do you use it from the
config file? If there's no way, then it isn't really a replacement.
The setup() function in the configuration file takes the application
object and can mutate it. For example, this code in conf.py would
interpret all emphasis markup as bold:
from sphinx.writers.html import HTMLTranslator
class MyTranslator(HTMLTranslator):
def visit_emphasis(self, node):
self.visit_strong(node)
def depart_emphasis(self, node):
self.depart_strong(node)
def setup(app):
app.set_translator('html', MyTranslator)
--
You received this message because you are subscribed to the Google Groups
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sphinx-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sphinx-users/8f2a219c-bf5a-2e9d-2903-b30fae8e64b3%40abou-samra.fr.