Skip to content

Commit

Permalink
Merge pull request #13 from hiro08gh/chore-remove-unused-library
Browse files Browse the repository at this point in the history
Chore remove lint packages and refactoring logic
  • Loading branch information
hiro08gh authored Aug 25, 2024
2 parents 776f60a + f2149dc commit 256c312
Show file tree
Hide file tree
Showing 8 changed files with 225 additions and 1,443 deletions.
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true


# Matches multiple files with brace expansion notation
# Set default charset
[*.{js,jsx,ts,tsx,html,sass,scss,css,json}]
charset = utf-8
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
34 changes: 0 additions & 34 deletions .eslintrc.js

This file was deleted.

1 change: 0 additions & 1 deletion .prettierignore

This file was deleted.

4 changes: 0 additions & 4 deletions .prettierrc

This file was deleted.

6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ npm install rich-editor-to-markdown-parser
## Usage

```js
import parse from 'rich-editor-to-markdown-parser';
import { parser } from 'rich-editor-to-markdown-parser';
// If you are importing multiple items with the same name parser, please assign an alias to them.
import { parser as RichEditorToMarkddownParser } from 'rich-editor-to-markdown-parser';

const html = '<h1>Hello World!</h1><p>This <strong>html</strong> string is <s>convert</s>into <a href="https://exampe.com">markdown.</a></p>'

parse(html); // # Hello World!\n\nThis **html** string is ~~convert~~ into [markdown.](https://exampe.com)
parser(html); // # Hello World!\n\nThis **html** string is ~~convert~~ into [markdown.](https://exampe.com)
```

※ Unsupported HTML tags are parsed as strings. When converting markdown to HTML, consider sanitizing it using [DOMPurify](https://github.com/cure53/DOMPurify) or [sanitize-html](https://github.com/apostrophecms/sanitize-html).
Expand Down
Loading

0 comments on commit 256c312

Please sign in to comment.