Minor refactoring in MarkdownInput