From 0103508b8c171663e5d90c39a252e9a16b4e6d5e Mon Sep 17 00:00:00 2001 From: Jeel Gajera Date: Sat, 4 Jan 2025 14:23:08 +0530 Subject: [PATCH] readme: update supported elements --- README.md | 44 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1ca51ea..177e623 100644 --- a/README.md +++ b/README.md @@ -136,19 +136,55 @@ Parses markdown into tokens and converts to a custom parsed structure. - `Promise`: Parsed markdown elements. - ## Supported Markdown Elements The following Markdown elements are currently supported by `jspdf-md-renderer`: +### Already Implemented: - **Headings**: `#`, `##`, `###`, etc. - **Paragraphs** - **Lists**: - - Unordered lists: `-`, `*`, `+` - - Ordered lists: `1.`, `2.`, `3.`, etc. - + - Unordered lists: `-`, `*`, `+` + - Ordered lists: `1.`, `2.`, `3.`, etc. +### Proposed for Future Implementation: +- **Emphasis**: + - **Bold**: `**bold text**` or `__bold text__` + - _Italic_: `*italic text*` or `_italic text_` + - **_Bold Italic_**: `***bold italic***` +- **Blockquotes**: + ```markdown + > This is a blockquote. + ``` +- **Images**: + ```markdown + ![Alt text](https://example.com/image.png) + ``` +- **Links**: + ```markdown + [GitHub](https://github.com) + ``` +- **Code Blocks** (fenced and indented): + ````markdown + ```js + console.log('Hello, world!'); + ``` + ```` + + +- **Inline Code**: + ```markdown + This is an `inline code` example. + ``` +- **Tables**: + ```markdown + | Header 1 | Header 2 | Header 3 | + | -------- | -------- | -------- | + | Row 1 | Data | Value | + | Row 2 | Data | Value | + ``` ## Examples + Output of above basic Example => [Sample Generated PDF](examples/test-pdf-gen/markdown_rendering_example.pdf) You can find more examples in the [examples](examples/test-pdf-gen) directory.