PR Guidelines not rendering code.

Issue #9 resolved
Nicholas Fiorentini created an issue

Hi,

I have a CONTRIBUTING.md file with a "code" section. Unfortunately that section is not properly rendered, as it is clearly visible from this screenshot:

Screen Shot 2017-03-10 at 17.36.34.png

I attached the original CONTRIBUTING.md.

Thank you very much for your support.

Nicholas

Comments (6)

  1. Abhin Chhabra Account Deactivated

    Thank you for bringing this to my attention @Nicholas Fiorentini.

    It looks like prguidelines is having trouble with level 1 and level 2 headers inside the code block. Did you mean for the code block to contain those headers verbatim?

    This is an interesting use-case and I'll try to make prguidelines deal with this better. In the mean time, maybe you can try not having level 1 and 2 headers inside the codeblock. I'll update this ticket when I have a fix and maybe then you could reintroduce those headers.

    Sorry for the inconvenience.

  2. Abhin Chhabra Account Deactivated

    parser: Fix issue #9

    The parser needs to copy the contents of a code block verbatim instead of trying to parse them and figuring out topics and sections from it.

    → <<cset 8983a6538688>>

  3. Abhin Chhabra Account Deactivated

    Hi @Nicholas Fiorentini,

    I ended up working on it and I think I have a fix. I've merged the fix into master but I'll deploy it later. I'm confident that it'll solve this issue, but I'll reopen this ticket if it doesn't.

  4. Abhin Chhabra Account Deactivated

    Hi @Nicholas Fiorentini,

    I've deployed the changes. Could you please try reloading the guidelines dialog and see if it works this time?

    I tried your CONTRIBUTING.md file. It seems to work for me, but the formatting still looks a bit funny to me.

  5. Nicholas Fiorentini reporter

    HI @Abhin Chhabra,

    thank you for your prompt reply. Regarding your original question, yes: I want the code block to contain those headers verbatim. The use case is to provide a "ready to use" pull request's description to my developers, so that all PRs have the same structure. The developers have only to fill the descriptions properly.

    I immediately tried and now I can see the text, yet the original markdown is still missing: Screen Shot 2017-03-11 at 18.22.50.png

    Please consider that Bitbucket is rendering the file as expected when you open it inside the "Source" panel.

    Thanks again for your support.

    Best Regards,

    Nicholas

  6. Log in to comment