summaryrefslogtreecommitdiff
path: root/doc/build/lib/highlight.py
diff options
context:
space:
mode:
Diffstat (limited to 'doc/build/lib/highlight.py')
-rw-r--r--doc/build/lib/highlight.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/doc/build/lib/highlight.py b/doc/build/lib/highlight.py
index df711965c..1a838408b 100644
--- a/doc/build/lib/highlight.py
+++ b/doc/build/lib/highlight.py
@@ -176,7 +176,13 @@ class PythonHighlighter(Highlighter):
curstyle = self.get_style(t[0], t[1])
(start, end) = self._line_grid(line, t[2], t[3])
- tokens.append(line[start[1]:end[1]])
+ text = line[start[1]:end[1]]
+
+ # special hardcoded rule to allow "interactive" demos without
+ # >>> getting sucked in as >> , > operators
+ if text == '">>>"':
+ text = '>>>'
+ tokens.append(text)
curc = t[3][1]
curl = t[3][0]