Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c7ae920

Browse files
committed
add flush_softspace() interface
1 parent e3d9320 commit c7ae920

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Lib/formatter.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ def add_literal_data(self, data):
109109
self.nospace = self.softspace = 0
110110
self.writer.send_literal_data(data)
111111

112+
def flush_softspace(self):
113+
if self.softspace:
114+
self.nospace = self.softspace = 0
115+
self.writer.send_flowing_data(' ')
116+
112117
def push_font(self, (size, i, b, tt)):
113118
if self.font_stack:
114119
csize, ci, cb, ctt = self.font_stack[-1]

0 commit comments

Comments
 (0)