Error viewing Markdown file - "An error occurred while parsing the page."

Issue #8175 resolved
Former user created an issue

I wrote a Markdown file locally and pushed it to Bitbucket. I navigate to the file in the source browser, but I see an error instead of my content:

"An error occurred while parsing the page."

This file is publically available here:

At first, I assumed my Markdown formatting has a bug. I pasted it into some online Markdown previewers, but they parsed it with no issues. I tried these:

Any ideas?

Comments (7)

  1. Zachary Davis Account Deactivated

    Hi Alex,

    I'm having some trouble tracking down the actual error (it appears to be timing out but the reason is unclear), however I did narrow down the problem to this section:

    #### Implementation of Type Class
            -- Programmer --
            class Num a where
              (+)    :: a -> a -> a
              (*)    :: a -> a -> a
              negate :: a -> a
              -- ...etc.
            -- Compiler --
            data Num a
              = MkNum (a->a->a)
            -- Get functions defined on the type
           (*) :: Num a -> a -> a -> a

    (Of course it's also breaking the rendering here, so I had to drop the last line)

    I'll continue looking into it, but I thought you might like to know.

    Cheers, Zach

  2. Alex Berg

    Super awesome, exactly what I needed!

    I figured it was good idea to file a bug for your next time you dive into this part of the code base. Maybe your parser can pass errors details to the user, or maybe that's a bad design decision? Interesting question. It would be useful for me, but it may seem unprofessional to some users.

    Off the top of your head, do you know how I can debug this next time? Like, if I install your markdown parsing library, will that work? Or is there another web app I can use which has an identical library but will give me error messages?

  3. Alex Berg

    I fixed the rendering issue by changing the source code as follows.

    Old: "(*) (MkNum _ m _ ...) = m"

    New: "(*) (MkNum _ m _ _) = m"

    The parsing issue occurs when the source file has three consecutive dots "...". A quick web search suggests that this is a Python keyword, but I probably misread (I haven't used Python yet).

    edit: Actually, I see I used three dots in other places, such as here "...etc.". Maybe the issue is three dots inside parens? "( ... )"

    I'm curious to hear your thoughts.

  4. Zachary Davis Account Deactivated

    The strange thing is that that line alone does not cause a problem, you need several of the lines above it to cause an error.

  5. Zachary Davis Account Deactivated

    So this is likely a bug with our python markdown implementation. We try to stay as current as possible, so we'll upgrade as soon as a new version is released.


  6. Log in to comment