Add server-side Mermaid flowchart diagram rendering to Markdown Introduce server-side SVG rendering for Mermaid flowcharts and graph diagrams (both 'graph' and 'flowchart' in TD, TB, LR, RL, BT orientations) embedded in Gitiles Markdown documents. Example rendering: https://imgur.com/a/JMuzziu Key components: - AST Parser: Token-based recursive scanner handling all standard node shapes (rectangle, rounded, stadium, subroutine, cylinder, circle, hexagon, diamond, asymmetric flag), full edge matrix (solid, dashed, thick, arrows, lines, bidirectional), infix/inline edge labels, multi-node ampersand chaining (e.g. A & B --> C & D), and nested subgraphs with direction overrides. - Layered Layout Engine: Sugiyama-inspired DAG layout supporting Coffman- Graham layering, barycentric crossing minimization, connected component partitioning for isolated subgraphs, lateral edge routing, and cycle-breaking loopback paths. - Security & Hardening: Clean AST-to-SVG emission ensuring zero HTML/DOM injection, strictly escaping XML text/tspans, eliminating raw <foreignObject>/<iframe> elements, and ignoring malicious click/style directives. - Fallback Mechanism: Safely falls back to raw <pre class="mermaid"> when diagrams are unsupported or malformed. - Test Coverage: 100% test line coverage with comprehensive unit, integration, and security attack test suites. Bug: b/490107924 Change-Id: I72ddb3eb67c2513c22444b62581ebd04aaa4afd2 TAG=agy CONV=85f7f320-abab-4b77-9892-70da2847776b
Gitiles is a simple repository browser for Git repositories, built on JGit. Its guiding principle is simplicity: it has no formal access controls, no write access, no fancy Javascript, etc.
Gitiles automatically renders *.md Markdown files into HTML for simplified documentation. Refer to the Markdown documentation for details.
Gitiles is configurable in a git-style configuration file named gitiles.config. Refer to the configuration documentation for details.
Use gerrit's issue tracker to file bugs.
Please refer to the Developer Guide.