Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
@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 2,689 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
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.