Fix #223: `demoteHeaders` should not modify anything in the document, apart from the headers
Merge pull request #269 from co-dan/demoteheaders

Fix #223: `demoteHeaders` should not modify anything in the document, apart from the headers