MCPcopy Create free account
hub / github.com/PageBot/PageBot / node_br

Method node_br

Lib/pagebot/base/typesetter.py:202–210  ·  view source on GitHub ↗

Add newline instance to the Galley.

(self, node, e)

Source from the content-addressed store, hash-verified

200 # Solve <br/> best by simple style with: doc.newStyle(name='br', postfix='\n')
201
202 def node_br(self, node, e):
203 """Add newline instance to the Galley."""
204 if self.br2Return:
205 context = self.context
206 style = self.styles.get('br') or self.styles.get('p')
207 bs = context.newString('\r', style=style)
208 self.append(bs)
209 else:
210 self.typesetNode(node, e)
211
212 def node_a(self, node, e):
213 """Ignore links, but process the block"""

Callers

nothing calls this directly

Calls 4

appendMethod · 0.95
typesetNodeMethod · 0.95
newStringMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected