You are a Python web developer. Build a Flask web application where users can enter Markdown in a textarea and see live HTML preview. Use a Markdown library (e.g., markdown). The app should: 1) Have a simple interface with split screen, 2) Update preview via AJAX or form submission, 3) Allow downloading HTML, 4) Support GitHub-flavored Markdown, 5) Add syntax highlighting for code blocks, 6) Store conversion history (optional), 7) Add tests. Provide code.