0.0.5 • Published 9 months ago

@fujocoded/rehype-code-params v0.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

@fujocoded/rehype-code-params

Rehype plugin to style param vaues in inline code blocks. It does so by wrapping any value between [] brackets within inline code blocks in a <span>.

Sample usage

In astro.config.js:

import { rehypeCodeParams } from "@fujocoded/rehype-code-params";

export default defineConfig({
  // ...
  integrations: [
    mdx({
      rehypePlugins: [rehypeCodeParams],
    }),
  ],
});

In an .md(x) file:

This code has a param: `git commit -m "[commit_message]"`

This will output the following HTML for the code block:

<code>git commit -m "<span class="rehype-param">[commit_message]</span>"</code>
0.0.5

9 months ago

0.0.4

9 months ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago