Skip to content
Prev Previous commit
Next Next commit
fix(files): apply task-list styling to ordered lists too
  • Loading branch information
waleedlatif1 committed Mar 28, 2026
commit 5f7c61f0c90acd875830e41bad9eeab52b4cb373
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,6 @@ const STATIC_MARKDOWN_COMPONENTS = {
{children}
</h4>
),
ol: ({ children }: any) => (
<ol className='mt-1 mb-3 list-decimal space-y-1 break-words pl-6 text-[14px] text-[var(--text-primary)]'>
{children}
</ol>
),
code: ({ inline, className, children, ...props }: any) => {
const isInline = inline || !className?.includes('language-')

Expand Down Expand Up @@ -189,6 +184,19 @@ function buildMarkdownComponents(
</ul>
)
},
Comment thread
waleedlatif1 marked this conversation as resolved.
ol: ({ className, children }: any) => {
const isTaskList = typeof className === 'string' && className.includes('contains-task-list')
return (
<ol
className={cn(
'mt-1 mb-3 space-y-1 break-words text-[14px] text-[var(--text-primary)]',
isTaskList ? 'list-none pl-0' : 'list-decimal pl-6'
)}
>
{children}
</ol>
)
},
li: ({ className, children }: any) => {
const isTaskItem = typeof className === 'string' && className.includes('task-list-item')
if (isTaskItem) {
Expand Down
Loading