Error with Python's multi-lines comments

32 views
Skip to first unread message

Miguel Ángel Prosper

unread,
Mar 18, 2016, 6:51:52 PM3/18/16
to js-code-prettifier
The code-prettifier doesn't take into account multi-line comments/strings using the triple " or ' in Python.

print("This is code")
"""
print("
The first two speech marks of the multi-line comment was treated as a normal string, the third one made a string closing after the 'print('. And the end of this print will open a new string.")
print("
The problem continues")

"""

print("This is code again")

Mike Samuel

unread,
Mar 18, 2016, 6:53:15 PM3/18/16
to js-code-p...@googlegroups.com

It should if you specify lang-py.  What does your HTML look like?

--
You received this message because you are subscribed to the Google Groups "js-code-prettifier" group.
To unsubscribe from this group and stop receiving emails from it, send an email to js-code-prettif...@googlegroups.com.
To post to this group, send email to js-code-p...@googlegroups.com.
Visit this group at https://groups.google.com/group/js-code-prettifier.
For more options, visit https://groups.google.com/d/optout.

Miguel Ángel Prosper

unread,
Apr 30, 2016, 6:47:27 PM4/30/16
to js-code-prettifier, mikes...@gmail.com
I already tried this, it did not solve the problem. After a few week I started working, I do not know why but now it works.


El viernes, 18 de marzo de 2016, 23:53:15 (UTC+1), Mike Samuel escribió:

It should if you specify lang-py.  What does your HTML look like?

On Mar 18, 2016 6:51 PM, "Miguel Ángel Prosper" <miguelang...@gmail.com> wrote:
The code-prettifier doesn't take into account multi-line comments/strings using the triple " or ' in Python.

print("This is code")
"""
print("
The first two speech marks of the multi-line comment was treated as a normal string, the third one made a string closing after the 'print('. And the end of this print will open a new string.")
print("
The problem continues")

"""

print("This is code again")

--
You received this message because you are subscribed to the Google Groups "js-code-prettifier" group.
To unsubscribe from this group and stop receiving emails from it, send an email to js-code-prettifier+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages