Skip to content

Commit 256c312

Browse files
authored
Merge pull request #13 from hiro08gh/chore-remove-unused-library
Chore remove lint packages and refactoring logic
2 parents 776f60a + f2149dc commit 256c312

File tree

8 files changed

+225
-1443
lines changed

8 files changed

+225
-1443
lines changed

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
end_of_line = lf
9+
insert_final_newline = true
10+
11+
12+
# Matches multiple files with brace expansion notation
13+
# Set default charset
14+
[*.{js,jsx,ts,tsx,html,sass,scss,css,json}]
15+
charset = utf-8
16+
indent_style = space
17+
indent_size = 2
18+
trim_trailing_whitespace = true

.eslintrc.js

Lines changed: 0 additions & 34 deletions
This file was deleted.

.prettierignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.prettierrc

Lines changed: 0 additions & 4 deletions
This file was deleted.

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ npm install rich-editor-to-markdown-parser
1313
## Usage
1414

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

1820
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>'
1921

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

2325
※ 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).

0 commit comments

Comments
 (0)