ReST README should look for modeline in first 2 lines

Issue #423 invalid
Augie Fackler
created an issue

The README for hgsubversion used to render in the source tab, but does not anymore.

Comments (19)

  1. Horst Gutmann

    Yes, a more liberal pattern for the format-preamble would really be nice considering that the current implementation requires the preamble to be outside of any kind of comment/hidden-area and therefor also gets rendered outside of bitbucket :-)

  2. Kevin Horn

    I figured out what the problem is.

    It appears that the RestructuredText preamble will not be recognized if the filename is 'README.txt'.

    If the filename is simply 'README', though, it works.

  3. Mehmet Catalbas

    Hi Santiago,

    Sorry for the late reply, we did not follow this one up. When I run the README through the reStructuredText parser we use, I get this:

    <string>:49: (ERROR/3) Unknown directive type "code-block".
    .. code-block:: bash
        $ hg clone

    So when parser raises an exception, we always fall back to plain text, which is what is happening in your case.

  4. Log in to comment