diplodoc-platform / transform

Simple transformer YFM (Yandex Flavored Markdown) to HTML.
MIT License
55 stars 36 forks source link

[WIP] Major 5 manifest #519

Open 3y3 opened 1 week ago

3y3 commented 1 week ago

Improve plugins functionality

Reduce package build size

Syntax

API

ogonkov commented 1 week ago

Can we move highlight.js initialization outside of markdown transformation?

To be able load it asynchronously for example

import t from '@diplodoc/transform';

import('highlight.js').then((highlightJsFn) => t(content, {highlight: highlightJsFn}))
ogonkov commented 2 days ago

Transform has some weak typings, for example in options, that allows any key

https://github.com/diplodoc-platform/transform/blob/357ad7cae2133d6c1a6fa83f98ab04dd07a7b10c/src/transform/typings.ts#L61

That would be great to replace it with generic, to force people correctly type their options