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
  3. Three

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

Event Timeline

bluehawk created this task.May 1 2014, 9:20 PM
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.

mroch added a subscriber: mroch.Aug 5 2014, 7:34 PM

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

mroch added a comment.Aug 5 2014, 8:27 PM

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.

  • uhh

    hhh

    hhhhhh
  • Uhhh

    ` code block? `

    Nope :(
bluehawk updated the task description. (Show Details)Oct 12 2014, 11:51 PM

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.

simevo added a subscriber: simevo.Aug 28 2016, 6:12 PM
em added a subscriber: em.Sep 9 2016, 10:10 PM
chad moved this task from Backlog to Parser on the Remarkup board.Mar 27 2017, 4:01 PM
epriestley closed this task as Wontfix.Apr 4 2018, 1:55 PM
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.