Ejemplo n.º 1
0
def postprocess(notename, html):
    p = markup_parser.parse(html)
    if "reminders" in p:
        reminders.save()
Ejemplo n.º 2
0
def postprocess(notename, html):
    p = markup_parser.parse(html)
    if "reminders" in p:
        reminders.save()
Ejemplo n.º 3
0
import markup_parser

result = markup_parser.parse(
    '<html><head><title>Test</title></head>'
    '<body><h1>Parse me!</h1><p>Reminders:</p><ul><li>Do this</li><li>And this</li></ul></body></html>'
)

assert "Reminders" in result, "No reminders"
assert len(result["Reminders"]) == 2, "Incorrect number of reminders"
print "Passed all tests!"
Ejemplo n.º 4
0
import markup_parser

result = markup_parser.parse(
    "<html><head><title>Test</title></head>"
    "<body><h1>Parse me!</h1><p>Reminders:</p><ul><li>Do this</li><li>And this</li></ul></body></html>"
)

assert "Reminders" in result, "No reminders"
assert len(result["Reminders"]) == 2, "Incorrect number of reminders"
print "Passed all tests!"