Python code is not rendered correctly
Muffo opened this issue · 4 comments
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
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?
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:
- Open the URL of a non existing page
- Create the page and add the markdown code
- Click on Preview using restructured text (do not selecting "Markdown")
- The error is displayed
- Go back to the Editor view
- Select Markdown and click again on Preview
- The error is still there
Hope this helps
ok, great report, I can reproduce it now . I'll see asap. thanks
There's no hurry for the fix :)
I am glad this was useful!