Page MenuHomePhabricator

Block level items in lists in remarkup
Closed, WontfixPublic

Description

The following:

Follow these instructions:
# Do something
# Run this code
```
mkdir foobar
cd foobar
```
# Do something else (this should be number 3)

Yields:

Follow these instructions:

  1. Do something
  2. Run this code
mkdir foobar
cd foobar
  1. Do something else (this should be number 3)

Because the code block is outside of the <li> and the <ul>, the next item starts a new <ul> and restarts the numbering. It might also be nice to be able to have multiple paragraphs in an li.

You can already have block level images, just because of the way you can embed images. For example:

# One
# Two {F149745}
# Three
  1. One
  2. Two
    undefined (33×106 px, 1 KB)
  3. Three

The image above is part of the previous <li> so the third item is numbered as number 3.

Event Timeline

bluehawk raised the priority of this task from to Needs Triage.
bluehawk updated the task description. (Show Details)
bluehawk added a subscriber: bluehawk.
epriestley triaged this task as Wishlist priority.May 1 2014, 10:07 PM
epriestley added a project: Remarkup.

This is unlikely to ever happen without stronger use cases for nested block-level elements.

I would like to have multiple paragraphs in an li so that, for example, I can say "here's a list of options" with a description of each item that is longer than a single paragraph. in markdown, you indent the subsequent paragraphs 4 spaces, but that conflicts with remarkup's 2-space-indent code snippet.

you guys

that has nothing to do with block level items in lists

nothing at all

In the description:

It might also be nice to be able to have multiple paragraphs in an li.

:-P

thanks though, awesome!

Use case for block items in lists:

I would like to give a series of instructions for a reviewer which includes running commands of some type (eg SQL, shell script, etc)

Usually I use backticks for this, but sometimes the commands are long and formatting them into a block item would allow for easier copy/pasting.

Here's an example:

  1. First instruction
  2. Second instruction with some command to run (in backticks) select foo from bar where baz not in ('A','B', 'C'') and baz2 not in ('C','D','E) (but imagine a 30+ line statement instead).
  3. Next instruction.

It would be nice to have the statement/command as a block level item.

  • Uhhh

    ` code block? `

    Nope :(

Two years later, any progress on this? I have the same intention as several of the comments, which is to simply embed code blocks in a numbered list of things to do.

  1. Check out the repo
  2. Run this script
./init.sh
  1. Develop

This should be steps 1, 2, 3.

When we make progress, we update tasks. We don't have a secret hidden version of Phabricator full of progress updates that we're hiding from the world.

See Planning.

This would be very useful for things like blocks of code. If you're suggesting a few options for a certain bit of code, or using a list to explain changes to multiple interfaces (code is much more concise than prose), nested code blocks would be very useful.

epriestley claimed this task.

This is unlikely to ever happen without stronger use cases for nested block-level elements.

Strong use cases haven't really materialized so I don't currently plan to pursue this.