Skip to content

Commit 98854c7

Browse files
committed
Remove phantom leading whitespace in history list
1 parent be84d09 commit 98854c7

2 files changed

Lines changed: 6 additions & 13 deletions

File tree

components/modals/CommitHistoryModal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,8 @@ const CommitHistoryModal: React.FC<CommitHistoryModalProps> = ({ isOpen, reposit
375375
{isExpanded ? <ChevronDownIcon className="h-5 w-5" /> : <ChevronRightIcon className="h-5 w-5" />}
376376
</span>
377377
<div className="flex-1">
378-
<div className="font-sans whitespace-pre-line text-gray-900 dark:text-gray-100">
379-
<HighlightedText text={sanitizedMessage} highlight={debouncedSearchQuery} />
378+
<div className="font-sans text-gray-900 dark:text-gray-100">
379+
<span className="block whitespace-pre-line"><HighlightedText text={sanitizedMessage} highlight={debouncedSearchQuery} /></span>
380380
</div>
381381
</div>
382382
</button>

docs/history-tab-preview.html

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,17 @@ <h1 class="text-xl font-bold">Commit History</h1>
1818
<div class="p-4">
1919
<ul class="space-y-3 list-none p-0">
2020
<li class="p-3 bg-gray-50 rounded-lg border border-gray-200">
21-
<div class="font-sans whitespace-pre-line text-gray-900 commit-message">
22-
23-
Merge pull request #10 from beNative/codex/add-sqljs-support-and-configuration
21+
<div class="font-sans text-gray-900">
22+
<span class="commit-message block whitespace-pre-line">Merge pull request #10 from beNative/codex/add-sqljs-support-and-configuration</span>
2423
</div>
2524
<div class="flex flex-col gap-2 text-xs text-gray-500 mt-2 pt-2 border-t border-gray-200 sm:flex-row sm:items-center sm:justify-between">
2625
<span>Tim Sinaeve</span>
2726
<span class="font-mono">7986e7f • 6 weeks ago</span>
2827
</div>
2928
</li>
3029
<li class="p-3 bg-gray-50 rounded-lg border border-gray-200">
31-
<div class="font-sans whitespace-pre-line text-gray-900 commit-message">
32-
33-
Use bundled sql.js assets for offline operation
30+
<div class="font-sans text-gray-900">
31+
<span class="commit-message block whitespace-pre-line">Use bundled sql.js assets for offline operation</span>
3432
</div>
3533
<div class="flex flex-col gap-2 text-xs text-gray-500 mt-2 pt-2 border-t border-gray-200 sm:flex-row sm:items-center sm:justify-between">
3634
<span>Tim Sinaeve</span>
@@ -40,10 +38,5 @@ <h1 class="text-xl font-bold">Commit History</h1>
4038
</ul>
4139
</div>
4240
</div>
43-
<script>
44-
document.querySelectorAll('.commit-message').forEach((el) => {
45-
el.textContent = el.textContent.trimStart();
46-
});
47-
</script>
4841
</body>
4942
</html>

0 commit comments

Comments
 (0)