We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 971255d commit 227723eCopy full SHA for 227723e
bot/utils.py
@@ -96,13 +96,13 @@ def __iter__(self):
96
in_quote = False
97
in_tag = 0
98
for token in super().__iter__():
99
- if token['type'] == 'StartTag' and token['name'] == 'pre':
100
- if not in_tag:
101
- token['data'] = {}
102
- yield {
103
- 'data': 'Suggestion:\n',
104
- 'type': 'Characters'
105
- }
+ if (not in_tag and token['type'] == 'StartTag' and token['name'] == 'pre'
+ and token['data'] and 'suggestion' in token['data'][(None, 'lang')]):
+ token['data'] = {}
+ yield {
+ 'data': 'Suggestion:\n',
+ 'type': 'Characters'
+ }
106
107
if token['type'] == 'StartTag' and token['name'] == 'li':
108
if not (token['data'] and token['data'].get('class') != 'task-list-item'):
0 commit comments