Thanks Jean -- that's exactly what I needed. I looked at the source-code but didn't see where the conf file was being used in an executable way.
I'll update the Stackoverflow question with your answer. Thanks again, -Dan On Wed, May 25, 2022 at 9:06 PM Jean Abou Samra <j...@abou-samra.fr> wrote: > 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 a topic in the > Google Groups "sphinx-users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/sphinx-users/tjyi1dtqpRA/unsubscribe. > To unsubscribe from this group and all its topics, 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 > . > -- 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/CAPdzqXCnsXtCrH0qWqCXA4fAdQxU84%2BL%2BT57WywBpm_z-OD-Zg%40mail.gmail.com.