Skip to content

The fencing detection for blocks does not support whitespace after the tics #20

@ntubach

Description

@ntubach

The setup for the block detection fence regex does not allow for whitespace utilization after the tics and before the 'math' keyword.
See

BLOCK_START_RE = re.compile(r"^(\s*)(`{3,}|~{3,})math")

Ex:

```math #this works
<render math>
```
``` math #this will not be detected as a markdown-katex math block
<render math>
```

I would like to update the above regex like to add in that whitespace support with something like a \s* clause
i.e. ^(\s*)(`{3,}|~{3,})\s*math

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions