Comment Markdown RenderA Visual Studio Code extension that renders Markdown content directly within code comments, including support for LaTeX math expressions. It handles most common comment styles across various programming languages, including multi-line block comments and stacked single-line comments. The original motivation was to be able to code in most languages as in a Jupyter notebook, particularly in Formalization languages (e.g., Lean4) where rendering mathematical formulas is particularly useful. ExampleAs shown below, when hovering over a comment block starting with the
How to UseTo trigger the Markdown rendering, simply start your comment with the Multi-line BlocksThe extension supports standard block comments across most languages:
Single-line CommentsYou can also stack single-line comments:
Supported Comment Styles
Features✅ Multi-line and single-line comment support - Works with both block comments and stacked single-line comments ✅ Multi-language support - Automatically detects and handles comment formats for different programming languages ✅ Full Markdown rendering - Supports complete Markdown syntax including lists, tables, code blocks, and more ✅ LaTeX math expressions - Render mathematical formulas using inline ($...$) and display ($$...$$) notation ✅ Comprehensive test coverage - Thoroughly tested across all supported languages and comment styles DevelopmentFor development details, please refer to DEVELOPMENT.md. Testing
LicenseMIT |
