Use case StRS-MDOKFSTUDIO-GFM-002
GitHub Flavored Markdown renders as on GitHub, safely
As a writer, I see GitHub Flavored Markdown the way GitHub shows it, with working links and the raw HTML that GitHub documents rely on, and nothing unsafe is rendered.
Use case diagram
How it is split
This use case (StRS) is reached by 2 paths, one per coloured line. A path goes from one situation (circle) to the next; each step (pill) is a behaviour (SwRS) with its own tests.
path 1: Paste a link and a table path 2: Alerts and raw HTML tables other outcomeone dot = one scenario checked: nominal boundary refusal
Path 1: Paste a link and a table
- Prose holds a bare URLSwRS-MDOKFSTUDIO-GFM-001 text with another meaning or another scheme is left unlinkedSwRS-MDOKFSTUDIO-GFM-001 · 1 test the page renders it as a link that follows the Markdown link policy
- The URL is a link, and the prose holds struck text, a footnote or a pipe tableSwRS-MDOKFSTUDIO-GFM-008 a single tilde pair and tildes in code stay literalSwRS-MDOKFSTUDIO-GFM-008 · 2 tests the page renders the struck text, the footnote and the table with its column alignment
- The struck text, the footnote and the aligned table are drawn
Path 2: Alerts and raw HTML tables
- A block quote starts with [!NOTE], [!TIP], [!IMPORTANT], [!WARNING] or [!CAUTION]SwRS-MDOKFSTUDIO-GFM-009 an unknown alert type is not an admonitionSwRS-MDOKFSTUDIO-GFM-009 · 9 tests the page renders it as an admonition of that type
- The alert is drawn as an admonition, and the document holds a raw HTML tableSwRS-MDOKFSTUDIO-GFM-031 unsafe style and active content are removedSwRS-MDOKFSTUDIO-GFM-031 · 2 tests the page rebuilds the table from the allow-list of tags and attributes
- The raw HTML table is drawn with its spans and safe colours
This map has 72 different ways through it in 8 steps or fewer. Instead of testing each one end to end, the 4 behaviours on the map are tested one by one, with 30 scenarios.
Behaviours of this use case
SwRS-MDOKFSTUDIO-CORE-071README-style HTML renders like GitHub and shows its tag in edit mode not on the map6 testsSwRS-MDOKFSTUDIO-GFM-001Bare URLs become safe links 1 testSwRS-MDOKFSTUDIO-GFM-008Strikethrough, footnotes and pipe tables render as on GitHub 2 testsSwRS-MDOKFSTUDIO-GFM-009GitHub alerts render as admonitions 9 testsSwRS-MDOKFSTUDIO-GFM-031Raw HTML tables are rebuilt from an allow-list 2 testsSwRS-MDOKFSTUDIO-GFM-034Colour spans keep safe colours only not on the map6 tests
SwRS-MDOKFSTUDIO-CORE-044Drop unsupported raw HTML superseded superseded by SwRS-MDOKFSTUDIO-CORE-071 Markdown file
SwRS-MDOKFSTUDIO-CORE-045Expand alerts in included files and context tags superseded superseded by SwRS-MDOKFSTUDIO-CORE-012 Markdown file
SwRS-MDOKFSTUDIO-CORE-056Rebuild raw HTML tables from an allow-list superseded superseded by SwRS-MDOKFSTUDIO-GFM-031 Markdown file
SwRS-MDOKFSTUDIO-CORE-062Render details and kbd blocks superseded superseded by SwRS-MDOKFSTUDIO-CORE-071 Markdown file
SwRS-MDOKFSTUDIO-GFM-002Trailing punctuation stays outside bare URLs superseded superseded by SwRS-MDOKFSTUDIO-GFM-001 Markdown file
SwRS-MDOKFSTUDIO-GFM-003Text with a meaning is not autolinked superseded superseded by SwRS-MDOKFSTUDIO-GFM-001 Markdown file
SwRS-MDOKFSTUDIO-GFM-004Only http, https and www hosts are autolinked superseded superseded by SwRS-MDOKFSTUDIO-GFM-001 Markdown file
SwRS-MDOKFSTUDIO-GFM-005Autolinks follow the Markdown link policy superseded superseded by SwRS-MDOKFSTUDIO-GFM-001 Markdown file
SwRS-MDOKFSTUDIO-GFM-006Editing an autolink shows the raw URL superseded superseded by SwRS-MDOKFSTUDIO-GFM-001 Markdown file
SwRS-MDOKFSTUDIO-GFM-007Pathological URLs render in linear time superseded superseded by SwRS-MDOKFSTUDIO-GFM-001 Markdown file
SwRS-MDOKFSTUDIO-GFM-010Alert marker text becomes the title superseded superseded by SwRS-MDOKFSTUDIO-GFM-009 Markdown file
SwRS-MDOKFSTUDIO-GFM-011Legacy bold markers render as admonitions superseded superseded by SwRS-MDOKFSTUDIO-GFM-009 Markdown file
SwRS-MDOKFSTUDIO-GFM-012Alert markers inside fences stay literal superseded superseded by SwRS-MDOKFSTUDIO-GFM-009 Markdown file
SwRS-MDOKFSTUDIO-GFM-013Alerts render the same in CRLF documents superseded superseded by SwRS-MDOKFSTUDIO-GFM-009 Markdown file
SwRS-MDOKFSTUDIO-GFM-014Footnotes render reference and text superseded superseded by SwRS-MDOKFSTUDIO-GFM-008 Markdown file
SwRS-MDOKFSTUDIO-GFM-015Pipe tables keep header and column alignment superseded superseded by SwRS-MDOKFSTUDIO-GFM-008 Markdown file
SwRS-MDOKFSTUDIO-GFM-029A small raw HTML subset renders and the rest is dropped superseded superseded by SwRS-MDOKFSTUDIO-CORE-071 Markdown file
SwRS-MDOKFSTUDIO-GFM-030Raw kbd renders as a key cap superseded superseded by SwRS-MDOKFSTUDIO-CORE-071 Markdown file
SwRS-MDOKFSTUDIO-GFM-032Raw table styles keep a sanitized subset superseded superseded by SwRS-MDOKFSTUDIO-GFM-031 Markdown file
SwRS-MDOKFSTUDIO-GFM-033Unsupported raw HTML is dropped superseded superseded by SwRS-MDOKFSTUDIO-CORE-071 Markdown file
SwRS-MDOKFSTUDIO-GFM-035The page revalidates span colours before applying superseded superseded by SwRS-MDOKFSTUDIO-GFM-034 Markdown file
SwRS-MDOKFSTUDIO-GFM-036Removed span styles record a diagnostic superseded superseded by SwRS-MDOKFSTUDIO-GFM-034 Markdown file
SwRS-MDOKFSTUDIO-GFM-037Alerts end at the first unquoted line superseded superseded by SwRS-MDOKFSTUDIO-GFM-009 Markdown file
SwRS-MDOKFSTUDIO-GFM-038Raw HTML tables remove active content superseded superseded by SwRS-MDOKFSTUDIO-GFM-031 Markdown file