diff --git a/beta/plugins/remark-header-custom-ids.js b/beta/plugins/remark-header-custom-ids.js
index 356de1bf136..55a10911ed9 100644
--- a/beta/plugins/remark-header-custom-ids.js
+++ b/beta/plugins/remark-header-custom-ids.js
@@ -39,7 +39,7 @@ module.exports = ({icon = svgIcon, className = `anchor`} = {}) => {
id
);
}
- id = id.slice(2, id.length - 2);
+ id = id.slice(2, id.length - 2).trim();
if (id !== toSlug(id)) {
throw Error(
'Expected header ID to be a valid slug. You specified: {/*' +
diff --git a/beta/src/content/learn/add-react-to-a-website.md b/beta/src/content/learn/add-react-to-a-website.md
index dc313e1718c..bd1e2f95589 100644
--- a/beta/src/content/learn/add-react-to-a-website.md
+++ b/beta/src/content/learn/add-react-to-a-website.md
@@ -10,19 +10,19 @@ You don't have to build your whole website with React. Adding React to HTML does
-* How to add React to an HTML page in one minute
-* What is the JSX syntax and how to quickly try it
-* How to set up a JSX preprocessor for production
+- How to add React to an HTML page in one minute
+- What is the JSX syntax and how to quickly try it
+- How to set up a JSX preprocessor for production
-## Add React in one minute {/*add-react-in-one-minute*/}
+## Add React in one minute {/* add-react-in-one-minute */}
React has been designed from the start for gradual adoption. Most websites aren't (and don't need to be) fully built with React. This guide shows how to add some “sprinkles of interactivity” to an existing HTML page.
Try this out with your own website or [an empty HTML file.](https://gist.github.com/gaearon/edf814aeee85062bc9b9830aeaf27b88/archive/3b31c3cdcea7dfcfd38a81905a0052dd8e5f71ec.zip) All you need is an internet connection and a text editor like Notepad or VSCode. (Here's [how to configure your editor](/learn/editor-setup/) for syntax highlighting!)
-### Step 1: Add a root HTML tag {/*step-1-add-a-root-html-tag*/}
+### Step 1: Add a root HTML tag {/* step-1-add-a-root-html-tag */}
First, open the HTML page you want to edit. Add an empty `
` tag to mark the spot where you want to display something with React. Give this `
` a unique `id` attribute value. For example:
@@ -38,7 +38,7 @@ It's called a "root" because it's where the React tree will start. You can place
You may have as many root HTML tags as you need on one page.
-### Step 2: Add the script tags {/*step-2-add-the-script-tags*/}
+### Step 2: Add the script tags {/* step-2-add-the-script-tags */}
In the HTML page, right before the closing `