fix expected to match correct parts of tidy
bunch of fixes

mostly for delimiting code blocks correctly