Skip to content

Commit cc8e12b

Browse files
remove indentation from search
1 parent 5d4820c commit cc8e12b

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

src/export/project.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,6 @@ export async function exporter(argument: ProjectExportArguments, json: any) {
461461
tags: course.g,
462462
image: course.i,
463463
url: course.u + '#' + (n + 1),
464-
indentation: sec[2],
465464
});
466465
}
467466
});
@@ -541,17 +540,14 @@ export async function exporter(argument: ProjectExportArguments, json: any) {
541540
}).join('') + '</div>';
542541
}
543542
544-
var indent = item.indentation > 1 ? ' style="padding-left:' + ((item.indentation - 1) * 12) + 'px"' : '';
545-
var prefix = item.indentation > 1 ? '<span class="text-muted me-1">' + '·'.repeat(item.indentation - 1) + '</span>' : '';
546-
547543
html += '<a href="' + escapeHtml(item.url) + '" target="_blank" class="list-group-item list-group-item-action py-2 px-3">' +
548-
'<div class="d-flex align-items-start"' + indent + '>' +
544+
'<div class="d-flex align-items-start">' +
549545
imgHtml +
550546
'<div class="flex-grow-1 overflow-hidden">' +
551547
(isFirstFromCourse && item.sectionTitle !== item.courseTitle
552548
? '<div class="text-muted small mb-1">' + highlight(item.courseTitle, matches, 'courseTitle') + '</div>'
553549
: '') +
554-
'<div class="fw-semibold">' + prefix + highlight(item.sectionTitle, matches, 'sectionTitle') + '</div>' +
550+
'<div class="fw-semibold">' + highlight(item.sectionTitle, matches, 'sectionTitle') + '</div>' +
555551
(item.sectionContent
556552
? '<div class="text-muted small text-truncate-multiline">' + highlight(excerpt(item.sectionContent, 160), matches, 'sectionContent') + '</div>'
557553
: '') +
@@ -745,7 +741,6 @@ function buildCourseSearchEntry(course: any): any | null {
745741
const s = sections.map((sec: any) => [
746742
inlineToText(sec.title).trim(),
747743
markdownToText(sec.code || ''),
748-
sec.indentation ?? 1,
749744
])
750745

751746
return { t: courseTitle, g: tags, i: image, u: baseUrl, s }

0 commit comments

Comments
 (0)