Save TitleΒΆ
Tag name: save-title
This preprocessor runs before any conversion of Markdown and searches for a heading in the first line of provided Markdown text.
If a heading is found on the first line, it saves the text for that heading in the title
attribute of the VertoResult
object.
Example
With the following text saved in example_string
:
# Example Title
This is a sentence.
import verto
converter = verto.Verto()
result = converter.convert(example_string)
print(result.title)
would result in:
Example Title