Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REQ] Enforce spaces as indent keywords for indented blocks #55

Open
mhatzl opened this issue Mar 20, 2024 · 0 comments
Open

[REQ] Enforce spaces as indent keywords for indented blocks #55

mhatzl opened this issue Mar 20, 2024 · 0 comments

Comments

@mhatzl
Copy link
Contributor

mhatzl commented Mar 20, 2024

All indented blocks must only allow spaces as indent keywords.
e.g. Block Quote must not allow ">" as indent keywords besides spaces.

Valid indenting:

> Block Quote
  That has valid indenting

Invalid indenting:

> Block Quote
> This is invalid.

Why?

It makes parsing much easier, because prefix matching can be changed to number of spaces to skip.
Rendering back to Unimarkup also gets easier, because the indent keyword will always be a space.

Affects

  • Heading
  • Line Block
  • Block Quote

Lists already only allowed spaces for indenting, so they are not affected.

For headings, it should also be allowed to specify another heading of any level directly before or after.
Compilers might still issue warnings if levels are not increasing by exactly one level.

# First heading lvl 1
# Second heading lvl 1 (warning might be set)

## First heading lvl 2
# Third heading lvl 1 (warning might be set)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant