feature: add comment test
This commit is contained in:
+11
-1
@@ -1,7 +1,17 @@
|
||||
import re
|
||||
|
||||
from mistletoe.block_token import BlockToken
|
||||
from mistletoe.span_token import SpanToken
|
||||
|
||||
|
||||
class Comment(BlockToken):
|
||||
class SpanComment(SpanToken):
|
||||
"""
|
||||
Coment span token (% Eiersalat).
|
||||
Identifies a comment in text.
|
||||
"""
|
||||
pattern = re.compile(r'(%.*\n?)')
|
||||
|
||||
class BlockComment(BlockToken):
|
||||
@staticmethod
|
||||
def start(line):
|
||||
return line.startswith("%")
|
||||
|
||||
Reference in New Issue
Block a user