This feature exists in mmark, a fork of the BlackFriday Markdown renderer with a focus on creating engineering documents, and recent versions of Hugo support that. Simply rename your
.md file to
.mmark and it should work. However, Mmark hasn’t been kept up-to-date with BlackFriday and doesn’t support some things like latex-style dashes, smart quotes, or fractions.