Skip to content

Commit c6d0685

Browse files
committed
Remove the comments on obvious actions
1 parent 1df45a6 commit c6d0685

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/django_mermaid/templatetags/mermaid.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def mermaid(diagram=None, theme=None):
3434

3535

3636
@register.tag(name="startmermaid")
37-
def do_startmermaid(parser, token):
37+
def startmermaid(parser, token):
3838
"""Render a mermaid diagram, using a block tag.
3939
4040
{% startmermaid "dark" %}
@@ -45,15 +45,13 @@ def do_startmermaid(parser, token):
4545
This tag is identical to the {% mermaid %} simple tag but allows usage as a block.
4646
That can be useful for longer diagrams. Specifying the theme is optional.
4747
"""
48-
# Split the token to try to capture a theme parameter if provided
48+
4949
bits = token.split_contents()
5050
if len(bits) > 1:
51-
# Strip surrounding quotes
5251
theme = ast.literal_eval(bits[1])
5352
else:
5453
theme = None
5554

56-
# Parse everything until the end tag 'endmermaid'
5755
nodelist = parser.parse(('endmermaid',))
5856
parser.delete_first_token()
5957

@@ -66,8 +64,5 @@ def __init__(self, nodelist, theme):
6664
self.theme = theme
6765

6866
def render(self, context):
69-
# Render the diagram from the block
7067
diagram_content = self.nodelist.render(context)
71-
# Pass processing on to the simple template tag
7268
return mermaid(diagram=diagram_content, theme=self.theme)
73-

0 commit comments

Comments
 (0)