subroutinerender_text
subroutine render_text(p, base, context, prefix, text, html)
Render text, as if it belonged to entity context, for a page prefix away from the root.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| p | type(project_t) | inout | target | the project |
| base | type(markdown_options_t) | in | the Markdown options | |
| context | integer | in | the entity, or 0 | |
| prefix | character(len=*) | in | from the page to the root of the site | |
| text | character(len=*) | in | the Markdown | |
| html | character(len=:) | out | allocatable | the HTML |
Calls
Source
Show the code
subroutine render_text(p, base, context, prefix, text, html)
type(project_t), intent(inout), target :: p !! the project
type(markdown_options_t), intent(in) :: base !! the Markdown options
integer, intent(in) :: context !! the entity, or 0
character(len=*), intent(in) :: prefix !! from the page to the root of the site
character(len=*), intent(in) :: text !! the Markdown
character(len=:), allocatable, intent(out) :: html !! the HTML
type(markdown_options_t) :: options
type(link_context_t), target :: link
options = base
link%list => p%list
link%entity = context
link%prefix = prefix
options%resolver_data => link
call markdown_to_html(text, options, html)
end subroutine render_text