{"repo":"kiranparajuli589/htmlmark","free":true,"listed":false,"github":"https://github.com/kiranparajuli589/htmlmark","clone":"git clone https://github.com/kiranparajuli589/htmlmark.git","description":"A very lightweight Markdown Parser ✨","language":"JavaScript","stars":16,"topics":["markdown","nodejs","javascript","lexer","parser","hacktoberfest","hacktoberfest2023"],"license":"GPL-3.0","category":"productivity","readme_excerpt":"HtmlMark A very lightweight Markdown Parser powered by Regex 🔑 Why HtmlMark? - no use of external dependencies - lexer: to produce markdown tokens - parser: to produce the HTML code from the lexer - code highlighting support - support for front matter 🌐 Demo Checkout the features of the parser from this Live Demo. 🎠 Installation 💠 Usage 🎡 Options Option Type Default Description ------------- ------------ ------------- --------------------------------------------------- indent number 4 Number of spaces (or tabs) to use for indentation tabSize number 4 Equivalent spaces for a single tab used highlightFn function undefined Function to highlight the code useLinkRefs boolean true Whether to use link references or not 🎢 APIs - tokenize(markdown: string): Token[] : Returns the lexer from the markdown string - parse(markdown: string): string : Returns the HTML code from the markdown string - getFrontMatter(markdown: string): FrontMatter{} : Returns the front matter from the markdown string Lexer The provided markdown string is scanned line by line and checked against various regex patterns to produce the accurate markdown tokens. A general token structure is as: Front Matter The front matter is the metadata of the markdown file. It is written in the YAML format and is separated from the markdown content by a line containing three hyphens --- . It must be placed at the top of the markdown file. Example: The above markdown file will produce the following front matter: 💁 Contribu","default_branch":null,"files":null,"tree":[],"storefront":"/r/kiranparajuli589","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/kiranparajuli589/htmlmark/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}