How do I get syntax highlighting in shared markdown?
To get syntax highlighting when sharing markdown online:
**Automatic with markshare:** markshare uses Shiki (the same engine as VS Code) for syntax highlighting. Just use fenced code blocks with a language tag:
def hello():
print("Hello, World!")Supported languages: JavaScript, TypeScript, Python, Go, Rust, Java, C++, SQL, and 100+ more.
**Other options:** - GitHub Gist: Good highlighting but plain appearance - HackMD: Requires publishing step - Pastebin: No syntax highlighting
**Pro tip:** markshare auto-detects the language if you forget the tag.