🐙 Cap 03: GitHub Flavored Markdown (GFM): Task Lists, Alerts, Autolinks e Diff Highlighting - Exemplos Práticos
Demonstração prática de sintaxe e código renderizável em Markdown.
🗺️ Mapa Arquitetural
flowchart LR
GFM["GitHub Flavored Markdown (GFM)"]
GFM --> ALERTS["Alertas Visuais: > [!NOTE], > [!TIP], > [!WARNING], > [!CAUTION]"]
GFM --> DIFF["Realce de Diffs de Código (```diff + / -)"]
GFM --> AUTO["Autolinks automáticos (#issue, @menções, commit SHAs)"]
style GFM fill:#e1f5fe,stroke:#03a9f4,stroke-width:2px
style ALERTS fill:#e8f5e9,stroke:#4caf50,stroke-width:1px
style DIFF fill:#fff3e0,stroke:#ff9800,stroke-width:1px
📄 Código de Demonstração (gfm_demo.md)
# Demonstração do GitHub Flavored Markdown
> [!NOTE]
> Este é um bloco de nota explicativa destacada em azul.
> [!TIP]
> Dica de performance: use caches de compilação em pipelines CI/CD.
> [!WARNING]
> Cuidado: modificar variáveis globais pode causar efeitos colaterais.
```diff
- function somar(a, b) { return a + b; }
+ function somar(a: number, b: number): number { return a + b; }
---
## 🚀 Saída Esperada do Parser / Renderizador
```text
GFM Validation:
✓ Alert blocks parsed: [NOTE], [TIP], [WARNING]
✓ Diff syntax highlighting verified (+ added lines in green, - removed in red)