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

feat/bug(commonmark] Block elements (including indented code blocks) under list items #181

Open
yellis opened this issue Jul 14, 2022 · 0 comments
Labels
commonmark Relates to commonmark round-tripping or syntax enhancement New feature or request

Comments

@yellis
Copy link
Contributor

yellis commented Jul 14, 2022

Is your feature request related to a problem? Please describe.
Cannot make block elements under list items (works in old editor)

Example scenarios that aren't working:

(1) (from https://meta.stackexchange.com/a/380355/51) Put in this text

You can solve this in the following ways:

1.     println("Hello, world!")

2.     System.out.println("Hello, world!")

switch to RT and it shows code blocks on new lines after the list items. Switch back and it stays that way in markdown.

screenshot of issue

We could say that if you want a code block inside a list item, you need to use backticks (the commonmark spec does not require indented code blocks in list items, though it is ambiguous). Or we could allow it (preferred, to be same as old editor). But either way, round-trip shouldn't change anything.

(2) From https://meta.stackexchange.com/a/380344/51, notes that the old editor allowed block elements (code block / heading / blockquote / table) inside list items, and the new one pushes them to new lines (as seen in the previous issue). Indeed, the menu items for block elements are turned of in RT mode when the cursor is inside a list item. Would be good if we can add this capability back, for parity. See that post for screenshots.

@yellis yellis added enhancement New feature or request commonmark Relates to commonmark round-tripping or syntax labels Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
commonmark Relates to commonmark round-tripping or syntax enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

1 participant