From 4aac6a6fe05f543a734d3f228ec173752f3a4144 Mon Sep 17 00:00:00 2001 From: jhauga Date: Thu, 18 Dec 2025 15:59:20 -0500 Subject: [PATCH 1/5] docs: browser example for marked on page data --- README.md | 35 +++++++++++++++++++++++++++++++++++ docs/INDEX.md | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) diff --git a/README.md b/README.md index 60f0b28bc0..8ccf6b9a26 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,41 @@ $ marked --help ``` +
+ +Render Full Page as Markdown + +```html + + + + + + + Marked for the full page + + + +
+# Title + +Lots of text using **markdown syntax.** +
+ + + + + +``` +
+ or import esm module ```html diff --git a/docs/INDEX.md b/docs/INDEX.md index 7254ef45b4..f484fd45d0 100644 --- a/docs/INDEX.md +++ b/docs/INDEX.md @@ -117,6 +117,42 @@ $ marked -s 'line1\nline2' -c config.json ``` + +
+ +Render Full Page as Markdown + +```html + + + + + + + Marked for the full page + + + +
+# Title + +Lots of text using **markdown syntax.** +
+ + + + + +``` +
+ or import esm module ```html From f51ebbd239a3aabf48527fb1b53b1ced7cbc25e1 Mon Sep 17 00:00:00 2001 From: John Haugabook Date: Thu, 18 Dec 2025 17:08:43 -0500 Subject: [PATCH 2/5] Apply suggestions from code review Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- README.md | 13 +++++++------ docs/INDEX.md | 13 +++++++------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 8ccf6b9a26..cbc3d45b99 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ $ marked --help ```
-Render Full Page as Markdown +Render On-Page Content as Markdown ```html @@ -108,18 +108,19 @@ $ marked --help -
+ +
diff --git a/docs/INDEX.md b/docs/INDEX.md index f484fd45d0..a784977b19 100644 --- a/docs/INDEX.md +++ b/docs/INDEX.md @@ -120,7 +120,7 @@ $ marked -s 'line1\nline2' -c config.json
-Render Full Page as Markdown +Render On-Page Content as Markdown ```html @@ -135,18 +135,19 @@ $ marked -s 'line1\nline2' -c config.json -
+ +
From 353e7aa7a50da813c7bfff75bb3bdbc013aabf96 Mon Sep 17 00:00:00 2001 From: jhauga Date: Wed, 24 Dec 2025 16:36:05 -0500 Subject: [PATCH 3/5] docs: browser example to USING_ADVANCED.md --- README.md | 36 ------------------------------------ docs/INDEX.md | 37 ------------------------------------- docs/USING_ADVANCED.md | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 73 deletions(-) diff --git a/README.md b/README.md index cbc3d45b99..60f0b28bc0 100644 --- a/README.md +++ b/README.md @@ -91,42 +91,6 @@ $ marked --help ``` -
- -Render On-Page Content as Markdown - -```html - - - - - - - Marked for the full page - - - - -
- - - - - -``` -
- or import esm module ```html diff --git a/docs/INDEX.md b/docs/INDEX.md index a784977b19..7254ef45b4 100644 --- a/docs/INDEX.md +++ b/docs/INDEX.md @@ -117,43 +117,6 @@ $ marked -s 'line1\nline2' -c config.json ``` - -
- -Render On-Page Content as Markdown - -```html - - - - - - - Marked for the full page - - - - -
- - - - - -``` -
- or import esm module ```html diff --git a/docs/USING_ADVANCED.md b/docs/USING_ADVANCED.md index ba758e56f5..b47cdd5389 100644 --- a/docs/USING_ADVANCED.md +++ b/docs/USING_ADVANCED.md @@ -111,6 +111,41 @@ Marked can be extended using [custom extensions](/using_pro#extensions). This is |[Typograf](https://github.com/laidrivm/marked-typograf)|[`marked-typograf`](https://www.npmjs.com/package/marked-typograf)|Use [typograf](https://www.npmjs.com/package/typograf) as a more powerful and extendable alternative to Smartypants for creating “smart” typographic punctuation, such as quotes and dashes.| |[XHTML](https://github.com/markedjs/marked-xhtml)|[`marked-xhtml`](https://www.npmjs.com/package/marked-xhtml)|Emit self-closing HTML tags for void elements (<br/>, <img/>, etc.) with a "/" as required by XHTML.| +

Browser

+ +Marked can render on-page content as markdown in the browser. + +```html + + + + + + + Marked for the full page + + + + +
+ + + + + +``` +

Inline Markdown

You can parse inline markdown by running markdown through `marked.parseInline`. From 0ef115ab5a5420d6f9607d46c186481aad552553 Mon Sep 17 00:00:00 2001 From: John Haugabook Date: Wed, 24 Dec 2025 20:54:41 -0500 Subject: [PATCH 4/5] Update docs/USING_ADVANCED.md Applied suggestion. Thank you. Co-authored-by: Tony Brix --- docs/USING_ADVANCED.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/USING_ADVANCED.md b/docs/USING_ADVANCED.md index b47cdd5389..03bbf0e09a 100644 --- a/docs/USING_ADVANCED.md +++ b/docs/USING_ADVANCED.md @@ -111,9 +111,10 @@ Marked can be extended using [custom extensions](/using_pro#extensions). This is |[Typograf](https://github.com/laidrivm/marked-typograf)|[`marked-typograf`](https://www.npmjs.com/package/marked-typograf)|Use [typograf](https://www.npmjs.com/package/typograf) as a more powerful and extendable alternative to Smartypants for creating “smart” typographic punctuation, such as quotes and dashes.| |[XHTML](https://github.com/markedjs/marked-xhtml)|[`marked-xhtml`](https://www.npmjs.com/package/marked-xhtml)|Emit self-closing HTML tags for void elements (<br/>, <img/>, etc.) with a "/" as required by XHTML.| -

Browser

+

User Examples

-Marked can render on-page content as markdown in the browser. +
+Marked can render on-page content as markdown in the browser. ```html @@ -144,8 +145,6 @@ Lots of text using **markdown syntax.** -``` -

Inline Markdown

You can parse inline markdown by running markdown through `marked.parseInline`. From 634822bfa516702b952daf1b1e5ba983d954e22b Mon Sep 17 00:00:00 2001 From: jhauga Date: Wed, 24 Dec 2025 21:21:27 -0500 Subject: [PATCH 5/5] docs: update menu, close user ex details --- docs/USING_ADVANCED.md | 4 ++++ docs/_document.html | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/docs/USING_ADVANCED.md b/docs/USING_ADVANCED.md index 03bbf0e09a..e3265e3554 100644 --- a/docs/USING_ADVANCED.md +++ b/docs/USING_ADVANCED.md @@ -114,6 +114,7 @@ Marked can be extended using [custom extensions](/using_pro#extensions). This is

User Examples

+ Marked can render on-page content as markdown in the browser. ```html @@ -145,6 +146,9 @@ Lots of text using **markdown syntax.** +``` +
+

Inline Markdown

You can parse inline markdown by running markdown through `marked.parseInline`. diff --git a/docs/_document.html b/docs/_document.html index b4f4db151d..15c771887f 100644 --- a/docs/_document.html +++ b/docs/_document.html @@ -233,6 +233,13 @@ >Known Extensions +
  • + User Examples +