Skip to content

Commit

Permalink
Add Python triple-quoted strings "known failure" (#1449)
Browse files Browse the repository at this point in the history
* Add example of failure in Python parser
  • Loading branch information
brandon-rhodes authored and mAAdhaTTah committed Jun 26, 2018
1 parent fedf03f commit 334c7bc
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion examples/prism-python.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,17 @@ <h2>Full example</h2>
return (copy[size/2 - 1] + copy[size/2]) / 2
if __name__ == '__main__':
import doctest
doctest.testmod()</code></pre>
doctest.testmod()</code></pre>

<h2>Known failures</h2>
<p>There are certain edge cases where Prism will fail.
There are always such cases in every regex-based syntax highlighter.
However, Prism dares to be open and honest about them.
If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.
</p>

<h3>Triple-quoted strings with what look like strings inside</h3>
<pre class="language-python"><code>def antique(string):
"""Replace anachronistic Latin "j" with "i"."""
return string.replace("j", "i").replace("J", "I")
</code></pre>

0 comments on commit 334c7bc

Please sign in to comment.