Skip to content

[Bug] Marktext removes attributes from code block #4770

Closed

Description

@N0rbert

Description

The below code fragment

Below is the labeled code block

```{example, listing1-name}
label for code listing 1
```

```plain
some
code
here
```

Text after code label and code block.

got modified after file save.

Steps to Reproduce

Open the document using 0.20.0~beta.4, save it.

Expected Behavior

The syntax is not modified.

Actual Behavior

The document is modified, transformed to

Below is the labeled code block

```{example,
label for code listing 1
```

```plain
some
code
here
```

Text after code label and code block.

Note that {example, listing1-name} got transformed to {example,, so listing looses its bookdown label.

Screenshots / Logs

No response

Operating System

Linux (Other)

MarkText Version

0.20.0~beta.4

OS Version

Debian 13.5

Reproducibility

  • I can reliably reproduce this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions