fdoc

functionfence_lengthpureprivate

pure integer function fence_length(line)

The length of the code fence that line starts with, or 0.

Arguments

NameTypeIntentAttributesDescription
linecharacter(len=*)in

the line

Result

NameTypeAttributesDescription
fence_lengthinteger

Source

Show the code
pure integer function fence_length(line)
    character(len=*), intent(in) :: line    !! the line
    character :: c

    fence_length = 0
    if (len(line) < 3) return
    c = line(1:1)
    if (c /= '`' .and. c /= '~') return
    fence_length = verify(line//' ', c) - 1
    if (fence_length < 3) fence_length = 0
end function fence_length

Graphs

Called by