mgaitan/waliki

Python code is not rendered correctly

Muffo opened this issue · 4 comments

Muffo commented

I am testing the demo of the Wiki and I have found an issue with pages containing Python code.

Text of the page

```
for i in range(3):
    print i
```

Result

``` for i in range(3):

System Message: WARNING/2 (<string> line 1) id2
Inline literal start-string without end-string.

System Message: ERROR/3 (<string> line 3)
Unexpected indentation.

print i
System Message: WARNING/2 (<string> line 4)
Block quote ends without a blank line; unexpected unindent.

```

System Message: WARNING/2 (<string> line 4) id4
Inline literal start-string without end-string.

System Message: WARNING/2 (<string> line 4) id6
Inline interpreted text or phrase reference start-string without end-string.

URL of the page http://waliki.pythonanywhere.com/newpage3/edit

See screenshot:
screenshot_051316_122113_pm

Hi @Muffo. I've tried the page you linked and I can't reproduce it, both in rst and md formats. The problem looks like the editor never knew you changed the default format (rst) to markdown, and it's rendering using the wrong processor for your markup. this is done via javascript, when you click in the dropdown.

which browser do you use? do you have javascript disabled, may be? Does it also happen to you editing a page that already exists?

Muffo commented

I am using the latest stable version of Chrome on Windows and after reloading the page it is working OK

I'll give you more details about what I did originally:

  1. Open the URL of a non existing page
  2. Create the page and add the markdown code
  3. Click on Preview using restructured text (do not selecting "Markdown")
  4. The error is displayed
  5. Go back to the Editor view
  6. Select Markdown and click again on Preview
  7. The error is still there

Hope this helps

ok, great report, I can reproduce it now . I'll see asap. thanks

Muffo commented

There's no hurry for the fix :)

I am glad this was useful!