offset should have been taken into account (like earlier)
new changes should not break old functionality
This commit is contained in:
parent
1d402a3d0c
commit
a1fd45bded
2
PRIVATE
2
PRIVATE
|
@ -1 +1 @@
|
||||||
Subproject commit 4ce625b4ac0da9d490620f8cf1694d0a057cfa47
|
Subproject commit 3abca9c1db05b76bff72b38b24897b881fd23077
|
|
@ -360,18 +360,19 @@ end subroutine remove_line_break
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief return the scalar list item without line break
|
!> @brief return the scalar list item without line break
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine list_item_inline(blck,s_blck,inline) !ToDo: SR: merge with remove_line_break eventually
|
subroutine list_item_inline(blck,s_blck,inline,offset)
|
||||||
|
|
||||||
character(len=*), intent(in) :: blck !< YAML in mixed style
|
character(len=*), intent(in) :: blck !< YAML in mixed style
|
||||||
integer, intent(inout) :: s_blck
|
integer, intent(inout) :: s_blck
|
||||||
character(len=:), allocatable, intent(out) :: inline
|
character(len=:), allocatable, intent(out) :: inline
|
||||||
|
integer, intent(inout) :: offset
|
||||||
|
|
||||||
character(len=:), allocatable :: line
|
character(len=:), allocatable :: line
|
||||||
integer :: indent,indent_next
|
integer :: indent,indent_next
|
||||||
|
|
||||||
|
indent = indentDepth(blck(s_blck:),offset)
|
||||||
line = IO_rmComment(blck(s_blck:s_blck + index(blck(s_blck:),IO_EOL) - 2))
|
line = IO_rmComment(blck(s_blck:s_blck + index(blck(s_blck:),IO_EOL) - 2))
|
||||||
indent = indentDepth(blck(s_blck:))
|
inline = line(indent-offset+3:)
|
||||||
inline = line(indent+3:)
|
|
||||||
s_blck = s_blck + index(blck(s_blck:),IO_EOL)
|
s_blck = s_blck + index(blck(s_blck:),IO_EOL)
|
||||||
|
|
||||||
indent_next = indentDepth(blck(s_blck:))
|
indent_next = indentDepth(blck(s_blck:))
|
||||||
|
@ -563,9 +564,9 @@ recursive subroutine lst(blck,flow,s_blck,s_flow,offset)
|
||||||
else ! list item in the same line
|
else ! list item in the same line
|
||||||
line = line(indentDepth(line)+3:)
|
line = line(indentDepth(line)+3:)
|
||||||
if(isScalar(line)) then
|
if(isScalar(line)) then
|
||||||
call list_item_inline(blck,s_blck,inline)
|
call list_item_inline(blck,s_blck,inline,offset)
|
||||||
call line_toFlow(flow,s_flow,inline)
|
|
||||||
offset = 0
|
offset = 0
|
||||||
|
call line_toFlow(flow,s_flow,inline)
|
||||||
elseif(isFlow(line)) then
|
elseif(isFlow(line)) then
|
||||||
s_blck = s_blck + index(blck(s_blck:),'-')
|
s_blck = s_blck + index(blck(s_blck:),'-')
|
||||||
if(isFlowList(line)) then
|
if(isFlowList(line)) then
|
||||||
|
|
Loading…
Reference in New Issue