From 84b902c5b7ec706791a293a31cc6581ea9c6dce0 Mon Sep 17 00:00:00 2001 From: Rupert Rawnsley Date: Tue, 15 Apr 2025 08:32:29 +0100 Subject: [PATCH 1/5] Note about preserving data in HTML transformation --- readme.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/readme.md b/readme.md index fd9ed93..f2687cf 100644 --- a/readme.md +++ b/readme.md @@ -391,6 +391,11 @@ You can define how directives are turned into HTML. If directives are not handled, they do not emit anything. +A generic transformation of directives and their attributes to HTML can be achieved by adding the +[rehype](https://github.com/rehypejs/rehype) and +[remark-directive-rehype](https://github.com/IGassmann/remark-directive-rehype) +processors. + ## CSS How to display directives is left as an exercise for the reader. From e25d6cf5a3334cfba7749983a983191f5130ef16 Mon Sep 17 00:00:00 2001 From: Rupert Rawnsley Date: Tue, 15 Apr 2025 08:38:18 +0100 Subject: [PATCH 2/5] Exceeded character line limit --- readme.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index f2687cf..d3a90dd 100644 --- a/readme.md +++ b/readme.md @@ -391,7 +391,8 @@ You can define how directives are turned into HTML. If directives are not handled, they do not emit anything. -A generic transformation of directives and their attributes to HTML can be achieved by adding the +A generic transformation of directives and +their attributes to HTML can be achieved by adding the [rehype](https://github.com/rehypejs/rehype) and [remark-directive-rehype](https://github.com/IGassmann/remark-directive-rehype) processors. From 70debde9d06713979005eef871a9dd54b8f432b8 Mon Sep 17 00:00:00 2001 From: Rupert Rawnsley Date: Tue, 15 Apr 2025 09:09:31 +0100 Subject: [PATCH 3/5] Adopted reference style demanded by the style guide --- readme.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index d3a90dd..911bdc9 100644 --- a/readme.md +++ b/readme.md @@ -393,8 +393,8 @@ they do not emit anything. A generic transformation of directives and their attributes to HTML can be achieved by adding the -[rehype](https://github.com/rehypejs/rehype) and -[remark-directive-rehype](https://github.com/IGassmann/remark-directive-rehype) +**[rehype][github-rehype]** and +**[remark-directive-rehype][github-remark-directive-rehype]** processors. ## CSS @@ -539,6 +539,8 @@ or community you agree to abide by its terms. [github-remark-stringify-quote]: https://github.com/remarkjs/remark/tree/main/packages/remark-stringify#options +[github-remark-directive-rehype]: https://github.com/IGassmann/remark-directive-rehype + [github-unified]: https://github.com/unifiedjs/unified [health]: https://github.com/remarkjs/.github From 96b85bf7ca513ad4db23140be7ba9408b2d95bae Mon Sep 17 00:00:00 2001 From: Rupert Rawnsley Date: Tue, 15 Apr 2025 09:11:37 +0100 Subject: [PATCH 4/5] References must be listed alphabetically --- readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index 911bdc9..4d41ba3 100644 --- a/readme.md +++ b/readme.md @@ -537,10 +537,10 @@ or community you agree to abide by its terms. [github-remark]: https://github.com/remarkjs/remark -[github-remark-stringify-quote]: https://github.com/remarkjs/remark/tree/main/packages/remark-stringify#options - [github-remark-directive-rehype]: https://github.com/IGassmann/remark-directive-rehype +[github-remark-stringify-quote]: https://github.com/remarkjs/remark/tree/main/packages/remark-stringify#options + [github-unified]: https://github.com/unifiedjs/unified [health]: https://github.com/remarkjs/.github From 185b5c7810089ae96486e2e930f4b27c1ad03242 Mon Sep 17 00:00:00 2001 From: Rupert Rawnsley Date: Tue, 15 Apr 2025 09:17:12 +0100 Subject: [PATCH 5/5] Moved to Related section as suggested --- readme.md | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/readme.md b/readme.md index 4d41ba3..96a2a5c 100644 --- a/readme.md +++ b/readme.md @@ -391,12 +391,6 @@ You can define how directives are turned into HTML. If directives are not handled, they do not emit anything. -A generic transformation of directives and -their attributes to HTML can be achieved by adding the -**[rehype][github-rehype]** and -**[remark-directive-rehype][github-remark-directive-rehype]** -processors. - ## CSS How to display directives is left as an exercise for the reader. @@ -473,6 +467,9 @@ or user content so there are no openings for * [`remark-mdx`](https://github.com/mdx-js/mdx/tree/main/packages/remark-mdx) — support MDX (ESM, JSX, expressions) +* [`remark-directive-rehype`](https://github.com/IGassmann/remark-directive-rehype) + — simple preservation of directives and attributes when transforming + to HTML with **[rehype][github-rehype]** ## Contribute @@ -537,8 +534,6 @@ or community you agree to abide by its terms. [github-remark]: https://github.com/remarkjs/remark -[github-remark-directive-rehype]: https://github.com/IGassmann/remark-directive-rehype - [github-remark-stringify-quote]: https://github.com/remarkjs/remark/tree/main/packages/remark-stringify#options [github-unified]: https://github.com/unifiedjs/unified