Skip to content

Commit

Permalink
feat: handle support for br tag inside inline elements (#34)
Browse files Browse the repository at this point in the history
Signed-off-by: K-Kumar-01 <[email protected]>
  • Loading branch information
K-Kumar-01 authored Jun 21, 2024
1 parent 7c133d8 commit c2a37d3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/helpers/xml-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,11 @@ const buildRun = async (vNode, attributes, docxDocumentInstance) => {
// do not slice and concat children since this is already accounted for in the buildRunOrRuns function
// eslint-disable-next-line no-continue
continue;
} else if (tempVNode.tagName === 'br') {
const lineBreakFragment = buildLineBreak();
runFragmentsArray.push(lineBreakFragment);
}
// TODO: check if picture can occur inside inline elements(not span)
}

if (tempVNode.children && tempVNode.children.length) {
Expand Down

0 comments on commit c2a37d3

Please sign in to comment.