Markdown OKF-Schema Studio

Use case StRS-MDOKFSTUDIO-CODE-001

A reader reads highlighted, numbered and diff code

Writers need code samples to read as they would in published documentation, in the language and colours of their editor, and reviewers need to see at a glance what a change adds and removes.

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: Read highlighted code path 2: Review a diff other outcomeone dot = one scenario checked: nominal boundary refusal
SwRS-MDOKFSTUDIO-CODE-001: Fenced code in a supported language is highlighted, other code stays literalSwRS-MDOKFSTUDIO-CODE-0016 teststhe preview colours the keywords,strings, numbers and comments ofthe language named by the fencelabelSwRS-MDOKFSTUDIO-CODE-039: Code lines are numbered and emphasizedSwRS-MDOKFSTUDIO-CODE-03910 testswith the line numbers setting on,a block of two lines or more isnumberedSwRS-MDOKFSTUDIO-CODE-008: Diff blocks show additions and deletionsSwRS-MDOKFSTUDIO-CODE-0083 testslines starting with + are markedas additions and lines startingwith - as deletionsSwRS-MDOKFSTUDIO-CODE-001: Fenced code in a supported language is highlighted, other code stays literalSwRS-MDOKFSTUDIO-CODE-0016 testsan unknown or absentlanguage stays plain textSwRS-MDOKFSTUDIO-CODE-039: Code lines are numbered and emphasizedSwRS-MDOKFSTUDIO-CODE-03910 testsa single line is never numberedSwRS-MDOKFSTUDIO-CODE-008: Diff blocks show additions and deletionsSwRS-MDOKFSTUDIO-CODE-0083 teststhe first character decides the markA document holds a fenced code blockA document holds afenced code blockThe code is colouredThe code is colouredThe lines of the code are numberedThe lines of the codeare numberedA document holds a diff blockA document holds a diffblockAdditions and deletions are marked in a full-width panelAdditions and deletionsare marked in afull-width panel

This map has 74 different ways through it in 8 steps or fewer. Instead of testing each one end to end, the 3 behaviours on the map are tested one by one, with 21 scenarios.

Behaviours of this use case

SwRS-MDOKFSTUDIO-CODE-001Fenced code in a supported language is highlighted, other code stays literal 6 testsSwRS-MDOKFSTUDIO-CODE-007Code blocks use one font scale, one box and scroll long lines not on the map3 testsSwRS-MDOKFSTUDIO-CODE-008Diff blocks show additions and deletions 3 testsSwRS-MDOKFSTUDIO-CODE-014A code directive shows its file name or caption above the code not on the map2 testsSwRS-MDOKFSTUDIO-CODE-039Code lines are numbered and emphasized 10 testsSwRS-MDOKFSTUDIO-CODE-040Code blocks sit on a dark Dark+ background in every preview theme by a setting not on the map5 testsSwRS-MDOKFSTUDIO-CORE-028Body text, headings, lists and block quotes are typeset readably not on the map5 testsSwRS-MDOKFSTUDIO-CORE-089Inline code is a readable tinted pill in text, links, tables and forced themes not on the map1 test
SwRS-MDOKFSTUDIO-CODE-002Resolve common fence labels to a supported grammar superseded superseded by SwRS-MDOKFSTUDIO-CODE-001 Markdown file
SwRS-MDOKFSTUDIO-CODE-003Read the fence label case-insensitively up to its first separator superseded superseded by SwRS-MDOKFSTUDIO-CODE-001 Markdown file
SwRS-MDOKFSTUDIO-CODE-004Leave unknown-language code as plain text superseded superseded by SwRS-MDOKFSTUDIO-CODE-001 Markdown file
SwRS-MDOKFSTUDIO-CODE-005Numbered, emphasized and diff blocks are wrapped into lines superseded superseded by SwRS-MDOKFSTUDIO-CODE-001, SwRS-MDOKFSTUDIO-CODE-039 Markdown file
SwRS-MDOKFSTUDIO-CODE-006Show special characters once in highlighted code superseded superseded by SwRS-MDOKFSTUDIO-CODE-005 Markdown file
SwRS-MDOKFSTUDIO-CODE-009Colour diff file header lines like ordinary lines superseded superseded by SwRS-MDOKFSTUDIO-CODE-008 Markdown file
SwRS-MDOKFSTUDIO-CODE-010Use system colours for diff lines in forced-colours mode superseded superseded by SwRS-MDOKFSTUDIO-CODE-008 Markdown file
SwRS-MDOKFSTUDIO-CODE-011Number and emphasize lines of MyST code directives superseded superseded by SwRS-MDOKFSTUDIO-CODE-005 Markdown file
SwRS-MDOKFSTUDIO-CODE-012Style fenced code blocks with one font scale and the code background superseded superseded by SwRS-MDOKFSTUDIO-CODE-007 Markdown file
SwRS-MDOKFSTUDIO-CODE-013Scroll long code lines inside their block superseded superseded by SwRS-MDOKFSTUDIO-CODE-007 Markdown file
SwRS-MDOKFSTUDIO-CODE-015Render a captioned code directive as a figure with a reference target superseded superseded by SwRS-MDOKFSTUDIO-CODE-014 Markdown file
SwRS-MDOKFSTUDIO-CODE-016Keep code backgrounds soft and readable in the forced white and cream themes superseded superseded by SwRS-MDOKFSTUDIO-CODE-007 Markdown file
SwRS-MDOKFSTUDIO-CODE-028Join a code caption to its block as a title bar superseded superseded by SwRS-MDOKFSTUDIO-CODE-014 Markdown file
SwRS-MDOKFSTUDIO-CODE-030Never highlight inline code superseded superseded by SwRS-MDOKFSTUDIO-CODE-001 Markdown file
SwRS-MDOKFSTUDIO-CODE-031Show fenced code text literally superseded superseded by SwRS-MDOKFSTUDIO-CODE-001 Markdown file
SwRS-MDOKFSTUDIO-CODE-036Show diff blocks as a full-width square panel superseded superseded by SwRS-MDOKFSTUDIO-CODE-008 Markdown file
SwRS-MDOKFSTUDIO-CODE-037Fall back to escaped text lines when a grammar fails superseded superseded by SwRS-MDOKFSTUDIO-CODE-001 Markdown file
SwRS-MDOKFSTUDIO-CODE-038Colour YAML code text with the link colour in the forced white and cream themes superseded superseded by SwRS-MDOKFSTUDIO-CORE-028 Markdown file