The Comprehensive Guide to Markdown, GFM & In-Browser Document Publishing
Mastering GitHub Flavored Markdown (GFM), CommonMark compliance, vector PDF compilation, and client-side privacy.
What is Markdown & Why Does It Dominate Modern Writing?
Created in 2004 by John Gruber and Aaron Swartz, Markdown is a lightweight plain-text formatting syntax designed to be readable and editable as-is without requiring complex WYSIWYG word processors. Its core philosophy is simple: plain text formatting should feel natural to write, easy to read in its raw form, and seamlessly translatable into clean, standards-compliant HTML5.
Over the past two decades, Markdown has evolved from a niche blogging tool into the international standard for software documentation (READMEs, API references, Git pull requests), technical blogging (Dev.to, Hashnode, Medium), static site generators (Next.js MDX, Astro, Docusaurus), and personal knowledge management (Obsidian, Notion, Logseq).
CommonMark vs. GitHub Flavored Markdown (GFM)
Early implementations of Markdown suffered from ambiguities: different parsers handled nested lists, whitespace, and HTML tags inconsistently. To solve this, the industry introduced two key specifications:
CommonMark Standard
A formal, unambiguous specification of Gruber's original Markdown syntax backed by a comprehensive test suite. Standardizes basic headings, blockquotes, ordered/unordered lists, emphasis, and code spans.
GitHub Flavored Markdown (GFM)
A superset of CommonMark defined by GitHub that adds essential modern primitives: tables, task checklists (- [ ]), strikethrough (~~text~~), and automatic URL autolinking.
PrivaStash implements full GitHub Flavored Markdown (GFM): your tables, checklists, and code fences render with pixel-perfect accuracy identical to GitHub's native web interface.
Vector PDF vs. Canvas Rasterization: Why Native Print Matters
Many online Markdown-to-PDF converters convert rendered HTML into an HTML5 Canvas bitmap image and wrap that image in a PDF. This flawed technique introduces severe defects:
- Blurry text when zoomed: Rasterized text turns into blurry pixels on high-DPI Retina screens and desktop prints.
- Non-selectable, non-searchable text: Readers cannot highlight paragraphs, copy code snippets, or search with Ctrl+F.
- Broken hyperlinks: Embedded links cease to function because the text is merely flat pixels.
- Bloated file sizes: Bitmap-based PDFs can easily exceed 10 MB for a simple 3-page document.
PrivaStash uses native CSS vector print rendering: when you click Save as PDF, our dedicated @media print engine isolates the rendered document, formats page margins for standard A4 and US Letter sizes, and invokes your browser's native print engine. The resulting PDF is 100% searchable, preserves crisp vector fonts at any zoom level, and keeps active clickable hyperlinks intact.
Confidentiality First: Zero Cloud Uploads for Sensitive Drafts
Writers, attorneys, and engineers frequently draft sensitive materials in Markdown: confidential product roadmaps, proprietary algorithm documentation, internal executive memos, legal agreements, and patent disclosures.
When you use cloud-based editors, your draft text is continuously transmitted across external networks and stored in remote database clusters, exposing your trade secrets to third-party data breaches, compliance audits, and employee telemetry.
With PrivaStash, your privacy is absolute: 100% of the lexical tokenization, GFM parsing, document telemetry calculations, and HTML/PDF compilation execute entirely inside your local browser memory. Not a single character of your document is ever uploaded or transmitted across the internet.
GitHub Flavored Markdown (GFM) Syntax Reference
| Element | Markdown Syntax | Rendered HTML Output |
|---|---|---|
| Heading 1 to 6 | # H1, ## H2, ### H3 | Semantic <h1> through <h6> HTML tags |
| Bold & Italic | **bold** and *italic* | <strong> and <em> emphasis text |
| Strikethrough (GFM) | ~~deleted text~~ | <del> text with strike line |
| Blockquote | > Quoted text statement | Indented stylized <blockquote> block |
| Inline Code | `const x = 42;` | Monospace <code> snippet |
| Code Fence | ```ts
console.log(42);
``` | Syntax highlighted <pre><code> block |
| Task Checklist (GFM) | - [ ] Todo
- [x] Done | Interactive checkbox list |
| Table (GFM) | | Col 1 | Col 2 |
| :--- | :--- | | Responsive HTML5 <table> structure |
| Hyperlink | [PrivaStash](https://privastash.com) | Secure <a target='_blank'> anchor |