Skip to content

Commit b71571b

Browse files
committed
Chore: typing corrections in the README.md
1 parent 8c6b147 commit b71571b

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

README.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This package is a [**unified**][unified] ([**remark**][remark]) plugin **to add
2121
- It can add `container` node, with _custom tag name, custom class name and also additional properties_.
2222
- It can add `title` node inside the container, if the title is provided, with _custom tag name, custom class name and also additional properties_.
2323

24-
**`remark-flexible-containers` supports nested containers.**
24+
**`remark-flexible-containers`** supports **nested containers.**
2525

2626
## Installation
2727

@@ -41,7 +41,9 @@ yarn add remark-flexible-containers
4141

4242
### ::: [type] [title]
4343

44-
Say we have the following file, `example.md`, which consists a flexible container. **Each container should be closed with the same colon `:::` at the end. It works also with more colons than tripple colon as well. (4-colon, or 5-colon and more).**
44+
Say we have the following file, `example.md`, which consists a flexible container. **Each container should be closed with the same length colon `:::` at the end.**
45+
46+
**It works also with more colons than tripple colon as well.** *(4-colon, or 5-colon and more)*
4547

4648
Below, the **container type** is "warning", specified _after the triple colon_ `:::`; and the **container title** is "title".
4749

@@ -90,7 +92,7 @@ async function main() {
9092
```
9193

9294
Now, running `node example.js` yields:\
93-
_(The `type` of the container is also added **as a class name** into the `container` node and the `title` node)_
95+
_(The `type` of the container is also added **as a classname** into the `container` node and the `title` node)_
9496

9597
```html
9698
<div class="remark-container warning">
@@ -206,7 +208,7 @@ If you don't provide a title, the default is **Details** for `<summary>` element
206208
</details>
207209
```
208210

209-
If you want `<details>` element is opened, add specific identifer **`{@open}`** (attribute) just after the type `details`.
211+
If you want `<details>` element is opened, add specific identifer **`{@open}`** attribute just after the type `details`.
210212
``` markdown
211213
::: details {@open} Title
212214
<!-- content -->
@@ -813,19 +815,21 @@ some **bold content** without stress
813815
The identifiers (`tagname`, `id`, `classnames`, `attributes`) **must be inside curly braces**.
814816
815817
Syntax is very simple.
816-
+ `tagname` is to be compatible HTML tag name, and may present only once,
817-
+ `id` is to start with hash **`#`**, and may present only once,
818-
+ `classnames` are to start with dot **`.`**, and may present many.
819-
+ `attributes` are to start with at sign **`@`**, and may present many, can be either boolean attribute or key=value attribute.
818+
+ **`tagname`** is to be compatible HTML tag name, and may present only once,
819+
+ **`id`** is to start with hash **`#`**, and may present only once,
820+
+ **`classnames`** are to start with dot **`.`**, and may present many.
821+
+ **`attributes`** are to start with at sign **`@`**, and may present many, can be either `bare` / `boolean` attribute or `key=value` attribute.
820822
821823
There are two groups of identifiers. Each group is optional, may present or not.\
822-
**The first group of identifiers** _(just after the `type`)_ is for `container` node.\
823-
**The second group of identifiers** _(just after the `title`)_ is for `title` node.
824+
+ **The first group of identifiers** _(just after the `type`)_ is for `container` node.\
825+
+ **The second group of identifiers** _(just after the `title`)_ is for `title` node.
824826
825827
**Here are some example usages.** *For simplicity, I omitted the container contents and ending syntax, just put the beginning syntax in the examples.* **All are valid usage for specific identifiers.**
826828
827829
> [!TIP]
828-
> **These identifiers can be placed as all, any three, any two, or just any of them in the desired order, with or without a space between them.** This is why the "flexibility" term comes from. However, make sure that **no character other than a space appears before the at sign (`@`)**, because if you are using a package like `remark-gfm`, it may interpret something like **`{span@open.someclass}`** as an **autolink**. For this reason, **you should insert a space before the at sign `@` if necessary.**
830+
> **These identifiers can be placed as all, any three, any two, or just any of them in the desired order, with or without a space between them.** This is why the "flexibility" term comes from.
831+
>
832+
> However, make sure that **no character other than a space appears before at sign (`@`)**, because if you are using a package like `remark-gfm`, it may interpret something like **`{span@open.someclass}`** as an **autolink**. For this reason, **you should insert a space before at sign `@` if necessary.**
829833
830834
```markdown
831835
::: info {section#foo.myclass.second-class} Title {span#baz.someclass.other-class}

0 commit comments

Comments
 (0)