Skip to content

Commit da79a8f

Browse files
Merge pull request #271 from jacobwilliams/array-indent
Fixed an issue with indenting of arrays within arrays.
2 parents 73dfd95 + d6cc6d0 commit da79a8f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/json_value_module.F90

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4894,7 +4894,13 @@ recursive subroutine json_value_print(json,p,iunit,str,indent,&
48944894

48954895
else
48964896

4897-
call write_it( start_array )
4897+
call write_it( s//start_array )
4898+
4899+
!if an array is in an array, there is an extra tab:
4900+
if (is_array) then
4901+
if ( .not. json%no_whitespace) tab = tab+1
4902+
spaces = tab*json%spaces_per_tab
4903+
end if
48984904

48994905
nullify(element)
49004906
element => p%children

0 commit comments

Comments
 (0)