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 fd(x) = Q∞ n=0 (1 − x −d n ), d ∈ N, d ≥ 2, which generalize the generating function f2(x) of the Thue–Morse number, and study their continued fraction expansion. In particular, we show that the convergents of x −d+1 fd(x) have a regular structure. We also address the question of whether the corresponding Mahler numbers fd(a) ∈ R, a, d ∈ N, a, d ≥ 2, are badly app...