File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,8 +86,13 @@ const gridHeaders = computed(() =>
8686 */
8787function exportComparisonDataAsMarkdown() {
8888 const mdData: Array <Array <string >> = []
89- mdData .push ([' ' , ... gridHeaders .value ])
90- const maxLengths = [0 , ... gridHeaders .value .map (header => header .length )]
89+ const headers = [
90+ ' ' ,
91+ ... gridHeaders .value ,
92+ ... (showNoDependency .value ? [$t (' compare.no_dependency.label' )] : []),
93+ ]
94+ mdData .push (headers )
95+ const maxLengths = headers .map (item => item .length )
9196
9297 selectedFacets .value .forEach ((facet , index ) => {
9398 const label = facet .label
@@ -104,9 +109,9 @@ function exportComparisonDataAsMarkdown() {
104109 : item ?.display || ' ' ,
105110 ),
106111 ])
107- mdData ?.[index + 1 ]?.forEach ((item , index ) => {
108- if (item .length > (maxLengths ?.[index ] || 0 )) {
109- maxLengths [index ] = item .length
112+ mdData ?.[index + 1 ]?.forEach ((item , itemIndex ) => {
113+ if (item .length > (maxLengths ?.[itemIndex ] || 0 )) {
114+ maxLengths [itemIndex ] = item .length
110115 }
111116 })
112117 })
You can’t perform that action at this time.
0 commit comments