hash-tag

Crates.iohash-tag
lib.rshash-tag
version
sourcesrc
created_at2024-12-04 13:52:11.417548
updated_at2024-12-12 13:21:21.168196
descriptionMarkdown to HTML parser.
homepage
repositoryhttps://github.com/pr4j3sh/hash-tag
max_upload_size
id1472031
Cargo.toml error:TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
prajesh (pr4j3sh)

documentation

README

hash-tag

<#>

Markdown to HTML Parser written in rust, built with wasm, for direct usage in javascript.

Features

  • Parses headings, blockquotes, inline code, codeblock, paragraphs, links, bold, italics, unordered lists and ordered list.
  • Visualize outputs using frames ui.

Usage

Using cargo

cargo install hash-tag
  • Use run
hash-tag path/to/file.md

Generates a index.html file

  • Specify output file using -o flag
hash-tag path/to/file.md -o path/to/file.html
  • Visualize output file using -v flag
hash-tag path/to/file.md -v path/to/view.html

This uses frames ui.

Using npm

  • Create a node environment
mkdir test
cd test
npm init -y
npm install @pr4j3sh/hash-tag
  • Create a new file index.js and write the code as:
import * as wasm from "@pr4j3sh/hash-tag";

const html = wasm.parse("## heading 2\n");
console.log(html);
  • Run using
node index.js
  • Outputs
<h2>heading 2</h2>

References

Commit count: 56

cargo fmt