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

Method h1_

Lib/pagebot/contexts/htmlcontext/htmlbuilder.py:783–795  ·  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.h1_('Hello world') >>> b.getHtml() ' Hello world '

(self, s, **args)

Source from the content-addressed store, hash-verified

781 self.newLine() # Optional newline is self.compact is False.
782
783 def h1_(self, s, **args):
784 """The `h1_` to `h6_` tags define headers, combining the opening and
785 closing tag where the s attribute is the block content.
786
787 >>> b = HtmlBuilder()
788 >>> b.compact = True
789 >>> b.h1_('Hello world')
790 >>> b.getHtml()
791 '<h1>Hello world</h1>'
792 """
793 self.h1(**args)
794 self.addHtml(s)
795 self._h1()
796
797 def h2(self, **args):
798 """The `h1` to `h6` tags define headers. h1 defines the largest header. h6

Callers

nothing calls this directly

Calls 3

h1Method · 0.95
addHtmlMethod · 0.95
_h1Method · 0.95

Tested by

no test coverage detected