[lib] refactored Markdown parser management into a dedicated class