text-style-saver
v1.0.2
Published
A lightweight Markdown to HTML parser without external dependencies to save blog styles, font size etc as string in sql/nosql database.
Downloads
6
Maintainers
Readme
Assalamualaikum! Presenting TextStyleSaver!
A lightweight Markdown to HTML parser without external dependencies.
Installation
To install the TextStyleSaver package, use npm:
npm install TextStyleSaver
Usage
const { TextStyleSaver } = require("TextStyleSaver");
const text = "# Hello, **Markdown**!";
const processedText = TextStyleSaver(text);
console.log(processedText);
The TextStyleSaver
function accepts a Markdown string as input and returns the parsed HTML.
Features
- Supports headings with different levels (
#
,##
,###
, etc.). - Handles bold and italic formatting (
**bold**
,*italic*
). - Converts unordered lists (
* item
) to<ul>
tags. - Converts ordered lists (
1. item
) to<ol>
tags.
Contributing
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on the GitHub repository.
Author
Created with love by AbdullahWins.
License
This project is licensed under the MIT License. See the LICENSE file for more information.