| 1 |
---input--- |
| 2 |
Code fence: |
| 3 |
|
| 4 |
``` |
| 5 |
foo |
| 6 |
``` |
| 7 |
|
| 8 |
Code fence with language: |
| 9 |
|
| 10 |
```python |
| 11 |
import this |
| 12 |
``` |
| 13 |
|
| 14 |
Code fence with unknown language: |
| 15 |
|
| 16 |
```invalid-lexer |
| 17 |
foo |
| 18 |
``` |
| 19 |
|
| 20 |
Code fence with extra stuff after the language name: |
| 21 |
|
| 22 |
```shell-session $? |
| 23 |
$ unknown |
| 24 |
``` |
| 25 |
|
| 26 |
---tokens--- |
| 27 |
'Code' Text |
| 28 |
' ' Text |
| 29 |
'fence:' Text |
| 30 |
'\n' Text.Whitespace |
| 31 |
|
| 32 |
'\n```\nfoo\n```\n' Literal.String.Backtick |
| 33 |
|
| 34 |
'\n' Text.Whitespace |
| 35 |
|
| 36 |
'Code' Text |
| 37 |
' ' Text |
| 38 |
'fence' Text |
| 39 |
' ' Text |
| 40 |
'with' Text |
| 41 |
' ' Text |
| 42 |
'language:' Text |
| 43 |
'\n' Text.Whitespace |
| 44 |
|
| 45 |
'\n```' Literal.String.Backtick |
| 46 |
'python' Literal.String.Backtick |
| 47 |
'\n' Text.Whitespace |
| 48 |
|
| 49 |
'import' Keyword.Namespace |
| 50 |
' ' Text.Whitespace |
| 51 |
'this' Name.Namespace |
| 52 |
'\n' Text.Whitespace |
| 53 |
|
| 54 |
'```\n' Literal.String.Backtick |
| 55 |
|
| 56 |
'\n' Text.Whitespace |
| 57 |
|
| 58 |
'Code' Text |
| 59 |
' ' Text |
| 60 |
'fence' Text |
| 61 |
' ' Text |
| 62 |
'with' Text |
| 63 |
' ' Text |
| 64 |
'unknown' Text |
| 65 |
' ' Text |
| 66 |
'language:' Text |
| 67 |
'\n' Text.Whitespace |
| 68 |
|
| 69 |
'\n```' Literal.String.Backtick |
| 70 |
'invalid-lexer' Literal.String.Backtick |
| 71 |
'\n' Text.Whitespace |
| 72 |
|
| 73 |
'foo\n' Literal.String |
| 74 |
|
| 75 |
'```\n' Literal.String.Backtick |
| 76 |
|
| 77 |
'\n' Text.Whitespace |
| 78 |
|
| 79 |
'Code' Text |
| 80 |
' ' Text |
| 81 |
'fence' Text |
| 82 |
' ' Text |
| 83 |
'with' Text |
| 84 |
' ' Text |
| 85 |
'extra' Text |
| 86 |
' ' Text |
| 87 |
'stuff' Text |
| 88 |
' ' Text |
| 89 |
'after' Text |
| 90 |
' ' Text |
| 91 |
'the' Text |
| 92 |
' ' Text |
| 93 |
'language' Text |
| 94 |
' ' Text |
| 95 |
'name:' Text |
| 96 |
'\n' Text.Whitespace |
| 97 |
|
| 98 |
'\n```' Literal.String.Backtick |
| 99 |
'shell-session' Literal.String.Backtick |
| 100 |
' ' Text.Whitespace |
| 101 |
'$?' Text |
| 102 |
'\n' Text.Whitespace |
| 103 |
|
| 104 |
'$ ' Generic.Prompt |
| 105 |
'unknown' Text |
| 106 |
'\n' Text.Whitespace |
| 107 |
|
| 108 |
'```\n' Literal.String.Backtick |