Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-CORE-041

Right-to-left text aligns to the right and blocks get an automatic direction

When a paragraph, heading, list item, block quote or table cell holds text, the extension SHALL give it `dir="auto"` when it has no dir attribute and keep an author's dir attribute only as ltr, rtl or auto, so that Hebrew or Arabic text aligns to the right edge of the column.

Step 1 of path 2 in StRS-MDOKFSTUDIO-CORE-001: from “The preview shows the unsaved text” to “Right-to-left text is aligned to the right”.

Scenarios 3

The situations the tests check; open one to read it.

nominalText direction of a paragraph
Givena Hebrew paragraph, then an English paragraph
Whenthey are shown
Thenthe Hebrew text ends at the right edge of the column
the English text starts at the left edge
nominalBlock elements without a dir attribute
InputOutcome
a heading, a paragraph, a list item, a block quote, a table header cell and a table data cell without direach carries dir auto
a div without dirgets no dir attribute
refusalAuthor dir attribute
InputOutcome
paragraphs with dir rtl and dir RTL with a trailing spaceboth read dir rtl (lower case, without spaces)
a paragraph with dir evilthe attribute is gone and the diagnostic blocked-dir is recorded

Implemented in 1

Tested by 2