An example extension implementing this role might look like this:
from docutils import nodes, utils
import posixpath
def sfile_role(typ, rawtext, etext, lineno, inliner, options={}, content=[]):
env = inliner.document.settings.env
baseuri = env.config.sfile_base_uri
text = utils.unes
Ok, I'll try that. If you can point me to an example, I'd appreciate
it.
Thanks,
Dan
On Dec 15, 6:38 am, Georg Brandl wrote:
> Dan Craig schrieb:
>
> > Is it possible to add functionality to some of the semantic markup
> > directives? Specifically, I'm interested in the :file: directive.
> >
Dan Craig schrieb:
> Is it possible to add functionality to some of the semantic markup
> directives? Specifically, I'm interested in the :file: directive.
> According to the documentation, all it does is format the text. I'd
> like it to format the text and create a hyperlink to a source code
>
Is it possible to add functionality to some of the semantic markup
directives? Specifically, I'm interested in the :file: directive.
According to the documentation, all it does is format the text. I'd
like it to format the text and create a hyperlink to a source code
viewer. It looks like this