New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed bug#6681: RST default reference role tries docutils' default role ... #368

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
5 participants
@jgsogo

jgsogo commented Sep 11, 2012

Fixes bug#6681 as described in https://code.djangoproject.com/ticket/6681

Docutils establish a ''DEFAULT_INTERPRETED_ROLE'' which is overriden by django with cmsreference role.

Django's role is intended to work on admin docs, but it's not suitable for general purpose as it needs some keys in ''inliner.document.settings''.

context = inliner.document.settings.default_reference_context
node = docutils.nodes.reference(rawtext, text, refuri=(ROLES[context] % (inliner.document.settings.link_base, text.lower())), **options)
return [node], []
except:

This comment has been minimized.

@apollo13

apollo13 Sep 16, 2012

Member

Is there really no alternative to a plain except? This would even catch KeyboardInterupt etc which we surely don't want. Which exceptions can occur here? As a last resort you can use except Exception, but I'd prefer it explicit.

@apollo13

apollo13 Sep 16, 2012

Member

Is there really no alternative to a plain except? This would even catch KeyboardInterupt etc which we surely don't want. Which exceptions can occur here? As a last resort you can use except Exception, but I'd prefer it explicit.

@timgraham

This comment has been minimized.

Show comment
Hide comment
@timgraham

timgraham May 31, 2013

Member

Ticket has been closed as contrib.markup has been deprecated.

Member

timgraham commented May 31, 2013

Ticket has been closed as contrib.markup has been deprecated.

@timgraham timgraham closed this May 31, 2013

@freakboy3742

This comment has been minimized.

Show comment
Hide comment
@freakboy3742

freakboy3742 Jun 17, 2013

Member

Reopening, as this isn't a problem with contrib.markup, but a problem with contrib.admindocs.

Member

freakboy3742 commented Jun 17, 2013

Reopening, as this isn't a problem with contrib.markup, but a problem with contrib.admindocs.

@freakboy3742 freakboy3742 reopened this Jun 17, 2013

@mrmachine

This comment has been minimized.

Show comment
Hide comment
@mrmachine

mrmachine Jun 18, 2013

An improved fix at #1277 -- no need to set a global default at all.

mrmachine commented Jun 18, 2013

An improved fix at #1277 -- no need to set a global default at all.

@timgraham timgraham closed this Jun 18, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment