It's a bit funny that I can replace "pedantry" with "mathematics" here and it still makes sense:
Mathematics is an excessive, boastful, or annoying focus on minor details, formal rules, and trivial points of learning.