Hi Takeshi,
On Sunday, 17 November 2019 13:09:52 UTC+1, Komiya Takeshi wrote:
>
> Where do you writing code? If you're using `conf.py`, please move them
> to independent file. `conf.py` is not good to implement extensions.
>
> Thanks, that made the job. I was not aware that extension should better be
written in indipendent files, I thought that it were simpler to have
everything in conf.py for testing purposes.
Let me also add that I had to slightly modify the AltRubricDirective class
as follows:
class AltRubricDirective(SphinxDirective):
#has_content = False
required_arguments = 1
optional_arguments = 0
final_argument_whitespace = True
def run(self):
set_classes(self.options)
altrubric_text = self.arguments[0]
textnodes, messages = self.state.inline_text(altrubric_text,
self.lineno)
arb = altrubric(altrubric_text, '', *textnodes, **self.options)
return [arb] + messages
Now it works as expected, so let me thank you once more for your kind and
invaluable assistance!
Bests regards,
Stefano
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/sphinx-users/061d81b1-b4b0-441c-bdf6-468d4948c798%40googlegroups.com.