mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
add flush_softspace() interface
This commit is contained in:
parent
e3d9320fc5
commit
c7ae92069d
1 changed files with 5 additions and 0 deletions
|
@ -109,6 +109,11 @@ class AbstractFormatter:
|
|||
self.nospace = self.softspace = 0
|
||||
self.writer.send_literal_data(data)
|
||||
|
||||
def flush_softspace(self):
|
||||
if self.softspace:
|
||||
self.nospace = self.softspace = 0
|
||||
self.writer.send_flowing_data(' ')
|
||||
|
||||
def push_font(self, (size, i, b, tt)):
|
||||
if self.font_stack:
|
||||
csize, ci, cb, ctt = self.font_stack[-1]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue