mirror of
https://github.com/jgm/pandoc.git
synced 2026-07-11 11:57:16 +00:00
8670f6dc5b
This allows the combination of the fenced code block shortcut form with
attributes:
````
```haskell {.class #id}
```
````
The code syntax class will be combined with the attribute classes.
This syntax allows for more intuitive writing and for better compatibility
with other Markdown parsers such as GitHub or Codeberg.
Closes #8174.
716 B
716 B
% pandoc -t native
```yaml {#id}
some: code
```
^D
[ CodeBlock ( "id" , [ "yaml" ] , [] ) "some: code" ]
% pandoc -t native
```yaml {.class #id}
some: code
```
^D
[ CodeBlock
( "id" , [ "yaml" , "class" ] , [] ) "some: code"
]
% pandoc -t native
```ab```
^D
[ Para [ Code ( "" , [] , [] ) "ab" ] ]
% pandoc -t native
```ab```{.class}
^D
[ Para [ Code ( "" , [ "class" ] , [] ) "ab" ] ]
% pandoc -t native
``` foo}{.bar}
test
```
^D
[ Para [ Code ( "" , [] , [] ) "foo}{.bar} test" ] ]