alexwkleung / mdast-inspector Goto Github PK
View Code? Open in Web Editor NEW๐ Inspect the mdast (Markdown Abstract Syntax Tree) of written Markdown content
Home Page: https://mdast-inspector.vercel.app/
License: MIT License
๐ Inspect the mdast (Markdown Abstract Syntax Tree) of written Markdown content
Home Page: https://mdast-inspector.vercel.app/
License: MIT License
Show position of children nodes
displays the wrong information. It shows the position of the document lines rather than each children node positions.
A checkbox should be created for Show document line position
using the logic from the current Show position of children nodes
implementation.
Each node type has children nodes, which contain the position. Most likely you'll need to extract each position property from every new children node and display it. This is just a rough idea but I'm assuming it shouldn't be too difficult.
Position of document line nodes should directly use the position key.
Getting the position of children nodes is unknown at the moment since I haven't correctly implemented it yet (as of writing this).
The input and output for unit tests are fairly basic, so adding more complex cases would be nice to have.
Using https://github.com/syntax-tree/unist-util-visit, you can recursively walk the AST returned by mdastFromMarkdown()
.
Adding extra logic to display the output in linear order, exactly how they are parsed is a good start (aside from UI) and matches the rest of the properties.
From testing the package previously, visit()
returns arrays like this:
['foo', 'paragraph']
['bar', 'strong']
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.