Skip to content

Commit 334c7bc

Browse files
brandon-rhodesmAAdhaTTah
authored andcommitted
Add Python triple-quoted strings "known failure" (#1449)
* Add example of failure in Python parser
1 parent fedf03f commit 334c7bc

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

examples/prism-python.html

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,17 @@ <h2>Full example</h2>
4848
return (copy[size/2 - 1] + copy[size/2]) / 2
4949
if __name__ == '__main__':
5050
import doctest
51-
doctest.testmod()</code></pre>
51+
doctest.testmod()</code></pre>
52+
53+
<h2>Known failures</h2>
54+
<p>There are certain edge cases where Prism will fail.
55+
There are always such cases in every regex-based syntax highlighter.
56+
However, Prism dares to be open and honest about them.
57+
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.
58+
</p>
59+
60+
<h3>Triple-quoted strings with what look like strings inside</h3>
61+
<pre class="language-python"><code>def antique(string):
62+
"""Replace anachronistic Latin "j" with "i"."""
63+
return string.replace("j", "i").replace("J", "I")
64+
</code></pre>

0 commit comments

Comments
 (0)