Using markdown hacks to make this website better.
Normal Writing
Underline
Some of these words <ins>will be underlined</ins>.
Some of these words will be underlined.
Centering text
<center>This text is centered.</center>
Coloring
<font color="red">This text is red!</font>
This text is red!
Commenting out
Here's a paragraph that will be visible.
[Hidden comment 😀]: #
And here's another paragraph that's visible.
Here’s a paragraph that will be visible.
And here’s another paragraph that’s visible.
Highlighting text
==highlight text==
highlight text
Code
Title for code block
Use title="...".
```js title="rendered"
console.log("Hello world)
```
console.log("Hello world)Line highlighting
Use {line_numbers}.
```js {2-3,6} title="rendered"
export function trimPathSuffix(fp: string): string {
fp = clientSideSlug(fp)
let [cleanPath, anchor] = fp.split("#", 2)
anchor = anchor === undefined ? "" : "#" + anchor
return cleanPath + anchor
}
```
export function trimPathSuffix(fp: string): string {
fp = clientSideSlug(fp)
let [cleanPath, anchor] = fp.split("#", 2)
anchor = anchor === undefined ? "" : "#" + anchor
return cleanPath + anchor
}Change line numbers
Use showLineNumbers{number}.
```js showLineNumbers{20} title="rendered"
export function trimPathSuffix(fp: string): string {
fp = clientSideSlug(fp)
let [cleanPath, anchor] = fp.split("#", 2)
anchor = anchor === undefined ? "" : "#" + anchor
return cleanPath + anchor
}
```
export function trimPathSuffix(fp: string): string {
fp = clientSideSlug(fp)
let [cleanPath, anchor] = fp.split("#", 2)
anchor = anchor === undefined ? "" : "#" + anchor
return cleanPath + anchor
}Word highlighting
Use /word/.
```js /useState/ title="rendered"
const [age, setAge] = useState(50);
const [name, setName] = useState('Taylor');
```
const [age, setAge] = useState(50);
const [name, setName] = useState('Taylor');Inline code
Normal: simply two backticks. `print([1, 2, 3])` → print([1, 2, 3])
Use `{:lang}` to apply coding style:
- `print([1, 2, 3]){:python}` →
print([1, 2, 3]) - `console.log(“I am here”, [1, 2, 3]){:js}` →
console.log("I am here", [1, 2, 3])
Sources: