sphinx-notes / comboroles

Sphinx extension for composing multiple roles
https://sphinx.silverrainz.me/comboroles/
BSD 3-Clause "New" or "Revised" License
6 stars 0 forks source link

Error when using role `:ref:` #2

Closed Diogo-Rossi closed 8 months ago

Diogo-Rossi commented 8 months ago

Using composite roles with :ref: gives an error in sphinx

ERROR: no such role: ref

To reproduce:

In Sphinx, make the following heading declaration:

.. _somestuff:

My section
==========

This works ok:

Have a look at :ref:`somestuff`

But when using the composite role in conf.py:

comboroles_roles = {
    "literal_ref": ["literal", "ref"],
}

This gives the error:

Have a look at :literal_ref:`somestuff`
ERROR: no such role: ref

OBS

I already made a workaround using this approach but opened this issue following this recomendation. Thanks for this great extension!

SilverRainZ commented 8 months ago

Hello, What's the version of the extension? It should be fixed in v1.0.0.a1

SilverRainZ commented 8 months ago

I have reproduced it, thanks for the report

SilverRainZ commented 8 months ago

3 should work for you.

SilverRainZ commented 8 months ago

Try ==1.0.0b0, see also: https://sphinx.silverrainz.me/comboroles/examples.html#cross-references-ref-doc-and-more

Diogo-Rossi commented 7 months ago

@SilverRainZ Thanks for the quick reply!

It is working now!