for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
"""
SDoc
Copyright 2016 Set Based IT Consultancy
Licence MIT
# ----------------------------------------------------------------------------------------------------------------------
from sdoc.sdoc2 import node_store
from sdoc.sdoc2.formatter.html.HtmlFormatter import HtmlFormatter
class ParagraphHtmlFormatter(HtmlFormatter):
HtmlFormatter for generating HTML code for paragraph.
# ------------------------------------------------------------------------------------------------------------------
def generate(self, node, file):
Generates the HTML code for a paragraph node.
:param sdoc.sdoc2.node.ParagraphNode.ParagraphNode node: The paragraph node.
:param file file: The output file.
file.write('<p>')
HtmlFormatter.generate(self, node, file)
file.write('</p>')
node_store.register_formatter('paragraph', 'html', ParagraphHtmlFormatter)