Skip to content

fix: Keeping docx's pBdr element with data-style=border in p tag

Sanjeev Kumar Rai requested to merge fix/border-element into wax2

<w:pBdr> tag is getting skipped while converting from docx to html. This tag is responsible to make a border. Below is the sample input:

<w:p w14:paraId="1BEB5E0E" w14:textId="2FCDA881" w:rsidR="001C571F" w:rsidRPr="00D32CE1" w:rsidRDefault="001C571F" w:rsidP="00F13160">
            <w:pPr>
                <w:pBdr>
                    <w:top w:val="single" w:sz="4" w:space="1" w:color="auto"/>
                    <w:left w:val="single" w:sz="4" w:space="4" w:color="auto"/>
                    <w:bottom w:val="single" w:sz="4" w:space="1" w:color="auto"/>
                    <w:right w:val="single" w:sz="4" w:space="4" w:color="auto"/>
                </w:pBdr>
            </w:pPr>
            <w:r w:rsidRPr="00D32CE1">
                <w:t xml:space="preserve">It should be noted </w:t>
            </w:r>
            <w:r w:rsidR="008559E8" w:rsidRPr="00D32CE1">
                <w:t xml:space="preserve">that </w:t>
            </w:r>
</w:p>

Converted html: <p>It should be noted that</p>

Below is the output after code update - <p data-style="border">It should be noted that</p>

Merge request reports