Files
pandoc/test/command/8174.md
Siphalor 8670f6dc5b Markdown reader: fenced code block shortcuts with attributes (#8174)
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.
2022-08-25 10:18:11 -07:00

45 lines
716 B
Markdown

````
% 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"
]
````
<!-- Inline code sections at the start of the line should not be mistaken for code blocks -->
````
% pandoc -t native
```ab```
^D
[ Para [ Code ( "" , [] , [] ) "ab" ] ]
````
````
% pandoc -t native
```ab```{.class}
^D
[ Para [ Code ( "" , [ "class" ] , [] ) "ab" ] ]
````
<!-- Illegal language identifiers should be treated as inline code for now -->
````
% pandoc -t native
``` foo}{.bar}
test
```
^D
[ Para [ Code ( "" , [] , [] ) "foo}{.bar} test" ] ]
````