Skip to content

Commit

Permalink
Simplify check for inline rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
nobkd committed Feb 3, 2025
1 parent a6986a2 commit 0857def
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/nuemark/src/render-tag.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ export function renderTag(tag, opts = {}) {
if (!fn) {
// native html tags
if (HTML_TAGS.includes(tag.name)) {
// inline / block without blocks, but with '_' data
if (tag.is_inline || (!tag.blocks?.length && tag.data?._)) return elem(tag.name, tag.attr, renderInline(tag.data?._, opts))
// inline / block without blocks
if (tag.is_inline || !tag.blocks?.length) return elem(tag.name, tag.attr, renderInline(tag.data?._, opts))

// block
tag.is_block = true
Expand Down Expand Up @@ -331,4 +331,4 @@ export function parseTable(lines) {
})

return { rows, ...specs }
}
}

0 comments on commit 0857def

Please sign in to comment.