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

Method h2_

Lib/pagebot/contexts/htmlcontext/htmlbuilder.py:822–835  ·  view source on GitHub ↗

The `h1_` to `h6_` tags define headers, combining the opening and closing tag where the s attribute is the block content. >>> b = HtmlBuilder() >>> b.compact = True >>> b.h2_('Hello world') >>> b.getHtml() ' Hello world '

(self, s, **args)

Source from the content-addressed store, hash-verified

820 self.newLine() # Optional newline is self.compact is False.
821
822 def h2_(self, s, **args):
823 """
824 The `h1_` to `h6_` tags define headers, combining the opening and closing tag
825 where the s attribute is the block content.
826
827 >>> b = HtmlBuilder()
828 >>> b.compact = True
829 >>> b.h2_('Hello world')
830 >>> b.getHtml()
831 '<h2>Hello world</h2>'
832 """
833 self.h2(**args)
834 self.addHtml(s)
835 self._h2()
836
837 def h3(self, **args):
838 """The `h1` to `h6` tags define headers. h1 defines the largest header. h6

Callers

nothing calls this directly

Calls 3

h2Method · 0.95
addHtmlMethod · 0.95
_h2Method · 0.95

Tested by

no test coverage detected