1. Bitbucket Website
  2. Public Issue Tracker
  3. master


Issue #5411 wontfix

RestructuredText .. include:: directive.

Michael Forbes
created an issue

It would be nice if the reST processor could parse .. include:: directives. The use-case is allowing one to factor out a set of links and replacements (I like to keep them in a top-level .links.rst file) so that one can freely use them in various .rst files throughout a project without having to redefine them in each file.

(It would actually be nice to be able to include a set of links from the web so that I only have to maintain one set, but this is probably a security problem, which is probably why ReStructuredText does not permit.)

Comments (4)

  1. Jesper Nøhr

    You are correct: This is indeed disabled for security purposes. We use docutils for rST, and it does not permit sandboxing includes. If we had it on, it would be a giant security risk.

  2. peterjc

    This blocks my intended usage of BitBucket for hosting a tutorial (*.rst files) including code blocks (e.g. little *.py scripts), potentially along with sample output (e.g. little *.txt files or images). But at least thanks to this bug report I know why it isn't working - thanks.

    Matching issue on GitHub: https://github.com/github/markup/issues/172

  3. Log in to comment