Skip to content

Commit

Permalink
Merge pull request #547 from impact27/fix_multiline_highlighting
Browse files Browse the repository at this point in the history
Remove non-breaking space in syntax highlighter
  • Loading branch information
ccordoba12 committed Jun 19, 2022
2 parents 0a8eaa1 + f6aad26 commit e659a04
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions qtconsole/frontend_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ def highlightBlock(self, string):
current_block = self.currentBlock()
string = current_block.text()

# QTextBlock::text() can still return non-breaking spaces
# for the continuation prompt
string = string.replace("\xa0", " ")

# Only highlight if we can identify a prompt, but make sure not to
# highlight the prompt.
without_prompt = self.transform_ipy_prompt(string)
Expand Down

0 comments on commit e659a04

Please sign in to comment.