Skip to content

Adding attributes to fenced markdown code blocks breaks syntax highlighting #62

Closed
@janosh

Description

@janosh

The following highlights fine in VS Code markdown.

```py
def greetings():
    print("Hello world!")
```

If I add attributes like line highlighting or a title, syntax highlighting is gone.

```py{1}:title=greet.py
def greetings():
    print("Hello world!")
```

How about just discarding everything after the first special character when reading the fence's language specifier?

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionalityhelp wantedIssues identified as good community contribution opportunities

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions