Consider the following sentence from a contemporary literary critique:
Despite its superficial pedantry, the novel subtly critiques the socio-political landscape of the era, challenging readers to reflect on their own beliefs.
In this context, the term pedantry most closely means: