Markdown: improve section filtering

Allow filtering with underlined headers and add test coverage.