In this paper we extend and generalize, up to a natural bound of the method, our previous work Badziahin and Zorin [‘Thue–Morse constant is not badly approximable’, Int. Math. Res. Not. IMRN 19 (2015), 9618–9637] where we proved, among other things, that the Thue–Morse constant is not badly approximable. Here we consider Laurent series defined with infinite products $f_{d}(x)=\prod _{n=0}^{\infty }(1-x^{-d^{n}})$, $d\in \mathbb{N}$, $d\geq 2$, which generalize the generating function $f_{2}(x)$ of the Thue–Morse number, and study their continued fraction expansion. In particular, we show that the convergents of $x^{-d+1}f_{d}(x)$ have a regular structure. We also address the question of whether the corresponding Mahler numbers $f_{d}(a)\in \mathbb{R}$, $a,d\in \mathbb{N}$, $a,d\geq 2$, are badly approximable.