-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Python triple-quoted strings "known failure" #1449
Add Python triple-quoted strings "known failure" #1449
Conversation
Let me know if there's a better way to get this documented for Python users of your library — or if there's a quick fix that I wasn't yet able to see from the examples. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine. If you make the one minor change, I'll merge as-is. Regex isn't my strong suit so I'm not sure how difficult a fix would be, but we've got a couple of string-like substring-type problems, so I'm not surprised to see it pop up here too.
examples/prism-python.html
Outdated
|
||
<h3>Triple-quoted strings with what look like strings inside</h3> | ||
<pre><code>def antique(string): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pre
needs the language-python
class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for getting there so late! Actually it does not. Examples files are included dynamically, and they are all wrapped in a <div class="language-XXX">
element, using the language the example is for. (See https://github.com/PrismJS/prism/blob/master/examples.js#L69-L73)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I caught that, see my comment below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, sorry. I stopped reading at your "Thanks!" comment. x) Please ignore me.
There, I added it. Thanks! |
Thanks! |
(By the way — none of the other |
Now that I'm looking closely, it turns out the class wasn't needed because of the way the examples page works. It injects your HTML page in a |
Documenting a failure that several of our users have run into,
since I’m not sure at first glance how to repair prism.js’s
Python rules without maybe breaking normal strings.