v0.3.0
Features
-
Use
sanitize-html
to ensure that HTML generated by Markdown processor is valid. -
Remove
<p>
tags within HTML elements or Svelte components that cannot contain paragraphs (e.g.,<span><p>*text*</p></span>
becomes<span><em>text</em></span>
now, ignoring insignificant whitespace. -
Add
markdown.components
option to SvelTeX configuration to specify preferences in regards to how each Svelte component is treated by SvelTeX when it comes to whitespace adjustments. -
Auto-import components "registered" in the
markdown.components
array from the SvelTeX configuration if they are used in the markup and not already imported in the file's<script>
tag.Note: a component is "registered" in the
markdown.components
array iff there exists an objectobj
in themarkdown.components
array such that all of the following hold:obj.name
equals the name of the component (case-sensitive).obj.importPath
is notundefined
.
-
Add
markdown.remarkRehypeOptions
andmarkdown.rehypeStringifyOptions
to SvelTeX configuration when theunified
Markdown backend is used.
Fixes
- Refine whitespace adjustment performed before passing markup to the Markdown processor.
Refactor
- Change default value of SvelTeX configuration property
markdown.directives.enabled
fromtrue
tofalse
.
Build
- Update dependencies.
Documentation
- Add
markdown.components
to https://sveltex.dev/docs/markdown.
Full Changelog: v0.2.1...v0.3.0