Issue #8143 wontfix

Allow users to customize which renderer handles different paths/file extensions (BB-9311)

Anonymous created an issue

it would be very nice if we could have html rendering for files not called whatever.rst. eg. cram insists on having its files called whatever.t. other than that, it's perfectly possible for cram tests to be valid reST, and mine are just that, see hg-request-pull.

Comments (4)

  1. Anonymous

    to clarify: i don't advocate treating everything as reST. what i'd like of is to let me associate renderers with paths in a more general way. it could be a form in the repo administration, or a file versioned in the repository, i don't care.

  2. Dylan Etkin

    Hi Roman,

    Allowing to specify rendering of every file would take a very unwieldy UI.

    I believe that cram will support any content in the .t file so we can not assume that .t should be rendered as RST.

    I am afraid we are going to leave the behavior as is.

    Thanks for understanding, cheers,


  3. Anonymous

    Hello Dylan,

    thanks for the reply. As I wrote in my previous comment, it need not be configured through the web ui, i would be perfectly happy if you used eg. <reporoot>/.bitbucket/renderers if present:

    spec = re.compile(r'(?P<type>\S+)\s+(?P<path>\S(?:(?![\r\n]).)*)')
    for line in renderers:
      match = spec.match(line)
      if match is None: continue
      if requested_path !='path'): continue

    It is my understanding that you use votes on site/master issues as one of inputs into deciding what to implement. If my understanding is correct I'd like to ask you to reopen this issue to keep it visible to other people. I believe this feature would be more generally useful, perhaps it'll get some upvotes.

  4. Log in to comment