mirror of https://github.com/status-im/reagent.git
Reformat code examples for using an entity
This commit is contained in:
parent
6615b535c4
commit
956f4dc1dc
|
@ -6,7 +6,7 @@ How can I use an entity like "nbsp"?
|
||||||
|
|
||||||
If you try to do this:
|
If you try to do this:
|
||||||
```clj
|
```clj
|
||||||
[:div "hello" " " "there"] ;; <--- note: attempt to use an entity
|
[:div "hello" " " "there"] ;; <--- note: attempt to use an entity
|
||||||
```
|
```
|
||||||
then you will see the string for the entity. Which is not what you want.
|
then you will see the string for the entity. Which is not what you want.
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ Instead you should do this:
|
||||||
2. Use it like this ...
|
2. Use it like this ...
|
||||||
|
|
||||||
```clj
|
```clj
|
||||||
[:div "hello" (gstring/unescapeEntities " ") "there"]
|
[:div "hello" (gstring/unescapeEntities " ") "there"]
|
||||||
```
|
```
|
||||||
|
|
||||||
**Note:** `unescapeEntities` relies on the DOM to produce a string with unescape entities;
|
**Note:** `unescapeEntities` relies on the DOM to produce a string with unescape entities;
|
||||||
|
|
Loading…
Reference in New Issue