
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
@astrojs/micromark-extension-mdx-jsx
Advanced tools
Less strict version of micromark-extension-mdx-jsx.
This fork is based on micromark/micromark-extension-mdx-jsx by the original author Titus Wormer.
The purpose of this fork is to provide extended MDX/JSX syntax support for the Astro website build tool. If you're not using Astro, you should probably use the original extension instead of this fork.
:
) preceded by whitespace start attribute names instead of local namesThe original code always treated colons inside JSX tags as a separator between a primary name and a local name, even if there was whitespace before the colon. Our forked version starts an attribute name instead of a local name if there is whitespace before the colon.
This leads to the following changes:
<input :placeholder="...">
is now treated as an input
element with an attribute named :placeholder
.
<input:placeholder="...">
, resulting in an element named input:placeholder
(with placeholder
being the local name of the element), and a syntax error due to the following unexpected value assignment ="..."
.<input disabled :placeholder="...">
is now treated as an input
element with two attributes named disabled
and :placeholder
.
<input disabled:placeholder="...">
, resulting in an input
element with only one attribute named disabled:placeholder
.As a result, these AlpineJS examples now work as expected:
<input type="text" :placeholder="placeholder">
<input type="text" disabled :placeholder="placeholder">
<div :class="open ? '' : 'hidden'">Test</div>
<div :style="true && { color: 'red' }">Test</div>
@
The original code did not allow attribute names to start with @
. Our forked version allows this.
As a result, these examples using the AlpineJS shorthand syntax for x-on:
now work as expected:
<button @click="handleClick">Test</button>
.
)The original code did not allow attribute names to contain dots. Our forked version allows this.
As a result, in combination with our change that allows @
to start attribute names, these AlpineJS examples now work as expected:
<button @click.once="console.log('I will only log once')">Test</button>
<input @input.debounce="fetchResults">
<input @input.debounce.500ms="fetchResults">
<div @keyup.escape.window="...">Test</div>
FAQs
Less strict version of micromark-extension-mdx-jsx.
The npm package @astrojs/micromark-extension-mdx-jsx receives a total of 3,227 weekly downloads. As such, @astrojs/micromark-extension-mdx-jsx popularity was classified as popular.
We found that @astrojs/micromark-extension-mdx-jsx demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.