Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-TOOLBAR-136

The exported file is self-contained and needs no script

When the extension writes the exported file, it SHALL embed the styles, the preview theme and width, the local images and, only for a page with math, the math fonts, and SHALL leave no script, external stylesheet or reference to the editor in the file.

Step 2 of path 1 in StRS-MDOKFSTUDIO-TOOLBAR-014: from “The place to save is chosen” to “The styles, the theme and the images are embedded”.

Scenarios 3

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

nominalOne file with no script
Givenan exported page
Whenthe file text is searched
Thenit has no `<script`, no `<link`, no `@import`, no `javascript:`, no `on...=` attribute and no `vscode-` name
nominalTheme, width and images travel with the file
Givena cream preview at the default content width, with a local PNG
Whenthe file is opened in a browser with JavaScript off
Thenthe page background and the content column width equal the preview's, and the image `src` is a `data:` URI
boundaryMath, missing images and zoom
InputOutcome
A page with mathThe KaTeX styles and fonts are embedded
A page without mathNo KaTeX style is embedded
An image that cannot be readIt is left out and the closing message counts it
The preview zoomed to 150 %The file is written at 100 %

Implemented in 3

Tested by 5