html を雑に AST にするやつを書いてる。parse5 だと 今回やろうとしてる使い方には厳密すぎる。 html ファイルを作るツールがほしいのん。

Follow

<img src="hoge" alt="""> を食わせたら、別ファイルにある画像の定義から picture 要素なり srcset なり作るようなのとか。

· · Web · 1 · 0 · 0

<heading2>fuga</heading2> 食わせたら <h2 class="heading2">fuga</h2> にしてくれるとか。

Sign in to participate in the conversation
Mastodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!