False Bold text detection

sample_bold.docx (54.4 KB)
I have provide a sample document for your references.

I think there is a False Positives. How can I avoid it.
I am sharing the output below that I am getting by using “run.getFont().getBold()”.
“bold_text”: [
{
“end_offset”: 8,
“text”: " ",
“start_offset”: 7
}
],

@cacglo This is not false positive result. In your document there is a bold whitespace. Please see the screenshot:

Also, you can see this if unzip your document and explore document.xml

<w:r>
	<w:rPr>
		<w:sz w:val="22"/>
		<w:lang w:val="en-GB"/>
	</w:rPr>
	<w:t>Table 1</w:t>
</w:r>
<w:r>
	<w:rPr>
		<w:b/>
		<w:sz w:val="22"/>
		<w:lang w:val="en-GB"/>
	</w:rPr>
	<w:t xml:space="preserve"> </w:t>
</w:r>

As you can see the second run has <w:b/> element in <w:rPr>.