subroutineremove_markdown_attributeprivate
subroutine remove_markdown_attribute(open_tag)
Remove markdown="..." from an opening tag.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| open_tag | character(len=:) | inout | allocatable | the tag |
Calls
Source
Show the code
subroutine remove_markdown_attribute(open_tag)
character(len=:), allocatable, intent(inout) :: open_tag !! the tag
integer :: a, b
a = index(lowercase(open_tag), 'markdown=')
b = a + 9
if (open_tag(b:b) == '"' .or. open_tag(b:b) == "'") b = b + index(open_tag(b + 1:), open_tag(b:b))
open_tag = strip(open_tag(:a - 1))//open_tag(b + 1:)
a = index(open_tag, ' >')
if (a > 0) open_tag = open_tag(:a - 1)//open_tag(a + 1:)
end subroutine remove_markdown_attribute