Skip to content

Prepend whitespace before each line for Markdown code block? #7

Closed
@victorhooi

Description

Would it be possible to add an option to prepend whitespace before each line?

The use case for this is to create a Markdown code block. In my case, I'm trying to create a Hubot script to insert an ASCII table into a Flowdock chat, using ascii-table.

Flowdock can create a code block (which will use mono-spaced font), however, each line needs to be pre-pended with four space characters. Stackoverflow also uses a similar system (four spaces), as does Github.

Is it possible to add an option to allow you to pad the beginning each line with spaces? E.g.

.----------------.
|    A Title     |
|----------------|
|   | Name | Age |
|---|------|-----|
| 1 | Bob  |  52 |
| 2 | John |  34 |
| 3 | Jim  |  83 |
'----------------'

Ok, the above will probably render as a code block, lol, but you get what I mean. Four spaces at the beginning of each line?

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