Assigned
Status Update
Comments
jp...@google.com <jp...@google.com>
jp...@google.com <jp...@google.com> #2
Verified the behavior of this bug. I have forwarded this to engineering.
Description
The
isBold()
andisBold(offset)
methods of Class Text returnnull
instead offalse
when parsing non-bold text.The documentation for isBold() states that the return value is of
Boolean
type: "whether the text is bold, or null if the element contains multiple values for this attribute".Similarly, the documentation for isBold(offset) states that the return value should also be of
Boolean
type: "The bold setting".So, according to the documentation,
null
should only be returned when anText
element contains both bold and non-bold characters.To reproduce:
myFunction()
from above.You should get the following output in the Execution log: Execution log #1
The expected Execution log output is: Execution log #2
Setting/unsetting the Bold property (from within the Docs UI) of either the entire word or parts of it does not seem to have any effect.
The only way to make
isBold()
returnfalse
is to set the Bold property programmatically withsetBold()
(this is what I had to do in order to obtain the second screenshot).