menu
Channels
Team
Posts
Members
Info

Rendering custom HTML elements into HAST

I've been playing around with the idea of rendering HTML custom element "components". The idea is that custom elements in the HTML get replaced in HAST by the output of a component function that returns a HAST sub-tree. The use-case is to do something like React components for…

thumbsup
1
message-simple
3

Is there any way to execute async work when visiting a node in unist-util-visit?

what I basically wanna do is but yeah it seems that is a no go? any ideas?

thumbsup
0
message-simple
1

Some question about package hastscript

Hi All! while i use hastscript to create trees, for example: console.log( …

thumbsup
0
message-simple
1

how to convert nlcst to hast or html?

been trying to absorb docs on unified. is there an existing way to take nlcst as an input and convert it to hast or html or a react component? ideally i'd like to addd custom classes/attributes/event listeners.

thumbsup
0
message-simple
5

Hello! Where's html-to-hast?

Is there a tool to parse HTML into Hast?

thumbsup
0
message-simple
10

Can remark parse and output a markdown document without changing its structure?

I'm looking to remove comments from a markdown file, but I don't want to alter the document in any other way. Does remark preserve the document like a concrete syntax tree or will information be lost in the process like a normal abstract syntax tree? Thanks!

thumbsup
0
message-simple
5

how can I wrap all <img> with <figure> ?

i expect to manipulate the syntax tree node, but it doesn't work so far, please help thanks

thumbsup
0
message-simple
1

Turn mdast Node into `div`

Is there a preferred or idiomatic way to turn an mdast Node into a div? It seems like setting node.type = 'div' works, but I haven't seen this documented anywhere surprisingly. Maybe I'm missing something?

thumbsup
0
message-simple
4

Prevent character escaping

yields an escaped value (&#x26;raquo;) Is there a way to prevent escaping characters?

thumbsup
0
message-simple
2

Is there any online editor yet like https://astexplorer.net/ for unist nodes?

thumbsup
0
message-simple
4