Eulerian idempotents and Milnor–Moore theorem for certain non-cocommutative Hopf algebras