Markdown OKF-Schema Studio

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
SwRS-MDOKFSTUDIO-GFM-001: Bare URLs become safe linksSwRS-MDOKFSTUDIO-GFM-0011 testthe page renders it as a link thatfollows the Markdown link policySwRS-MDOKFSTUDIO-GFM-008: Strikethrough, footnotes and pipe tables render as on GitHubSwRS-MDOKFSTUDIO-GFM-0082 teststhe page renders the struck text,the footnote and the table withits column alignmentSwRS-MDOKFSTUDIO-GFM-009: GitHub alerts render as admonitionsSwRS-MDOKFSTUDIO-GFM-0099 teststhe page renders it as anadmonition of that typeSwRS-MDOKFSTUDIO-GFM-031: Raw HTML tables are rebuilt from an allow-listSwRS-MDOKFSTUDIO-GFM-0312 teststhe page rebuilds the table fromthe allow-list of tags andattributesSwRS-MDOKFSTUDIO-GFM-001: Bare URLs become safe linksSwRS-MDOKFSTUDIO-GFM-0011 testtext with another meaningor another scheme is leftunlinkedSwRS-MDOKFSTUDIO-GFM-008: Strikethrough, footnotes and pipe tables render as on GitHubSwRS-MDOKFSTUDIO-GFM-0082 testsa single tilde pair and tildes in code stay literalSwRS-MDOKFSTUDIO-GFM-009: GitHub alerts render as admonitionsSwRS-MDOKFSTUDIO-GFM-0099 testsan unknown alert type isnot an admonitionSwRS-MDOKFSTUDIO-GFM-031: Raw HTML tables are rebuilt from an allow-listSwRS-MDOKFSTUDIO-GFM-0312 testsunsafe style and active content are removedProse holds a bare URLProse holds a bare URLThe URL is a link, and the prose holds struck text, a footnote or a pipe tableThe URL is a link, andthe prose holds strucktext, a footnote or apipe tableThe struck text, the footnote and the aligned table are drawnThe struck text, thefootnote and the alignedtable are drawnA block quote starts with [!NOTE], [!TIP], [!IMPORTANT], [!WARNING] or [!CAUTION]A block quote startswith [!NOTE], [!TIP],[!IMPORTANT], [!WARNING]or [!CAUTION]The alert is drawn as an admonition, and the document holds a raw HTML tableThe alert is drawn as anadmonition, and thedocument holds a rawHTML tableThe raw HTML table is drawn with its spans and safe coloursThe raw HTML table isdrawn with its spans andsafe 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