File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,7 +95,12 @@ pure function aggregate_vector_diagnosis(diagnoses) result(diagnosis)
9595 integer i
9696 allocate (array(size (diagnoses)))
9797 do i = 1 , size (diagnoses)
98- array(i) = string_t(new_line_indent // diagnoses(i)% diagnostics_string_)
98+ if (diagnoses(i)% diagnostics_string_(1 :1 ) == new_line(' ' )) then
99+ ! don't prepend a another newline if the string already begins with one
100+ array(i) = diagnoses(i)% diagnostics_string_
101+ else
102+ array(i) = string_t(new_line_indent // diagnoses(i)% diagnostics_string_)
103+ end if
99104 end do
100105 diagnosis = test_diagnosis_t( &
101106 test_passed = all (diagnoses% test_passed_) &
@@ -119,7 +124,12 @@ pure function aggregate_vector_diagnosis(diagnoses) result(diagnosis)
119124 integer i
120125 allocate (array(size (diagnoses)))
121126 do i = 1 , size (diagnoses)
122- array(i) = string_t(new_line_indent // diagnoses(i)% diagnostics_string_)
127+ if (diagnoses(i)% diagnostics_string_(1 :1 ) == new_line(' ' )) then
128+ ! don't prepend a another newline if the string already begins with one
129+ array(i) = diagnoses(i)% diagnostics_string_
130+ else
131+ array(i) = string_t(new_line_indent // diagnoses(i)% diagnostics_string_)
132+ end if
123133 end do
124134 diagnosis = test_diagnosis_t( &
125135 test_passed = all (diagnoses% test_passed_) &
You can’t perform that action at this time.
0 commit comments