Spam elements are inline markdown blocks like image, bold text, or hypertext link. A span element is basically a string so it must mandatorily be placed inside a block element.
from markdownio import MarkdownIO, span
document = MarkdownIO()
document.p(span.link(path="http://test.com"))
print(document.output())output:
<http://test.com>document.p(span.link(path="http://test.com"))
document.p(span.link(path="http://test.com", text="hello"))
document.p(span.link(path="http://test.com", title="hello"))
document.p(span.link(path="http://test.com", text="hello", title="hello"))<http://test.com>
[hello](http://test.com)
[http://test.com](http://test.com "hello")
[hello](http://test.com "hello")document.p("Hello " + span.bold(text="world") + "!")
document.p("Hello " + span.italic(text="world") + "!")
document.p("Hello " + span.strikethrough(text="world") + "!")
document.p("Hello " + span.bold(text=span.italic(text="world")) + "!")Hello **world**!
Hello _world_!
Hello ~~world~~!
Hello **_world_**!document.p(span.image(path="http://test.com/img.jpg"))
document.p(span.link(path="http://test.com/img.jpg", alt="img"))
document.p(span.link(path="http://test.com/img.jpg"), title="img")
document.p(span.link(path="http://test.com/img.jpg"), alt="img", title="img")


