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

No way to do ordered lists in Docco #277

Closed
machineghost opened this issue Apr 7, 2014 · 2 comments
Closed

No way to do ordered lists in Docco #277

machineghost opened this issue Apr 7, 2014 · 2 comments

Comments

@machineghost
Copy link

I'm not sure how feasible this is, but it'd be really nice if one could do ordered lists across blocks of code in Docco. Currently if you do:

// 1. Foo
// 2. Bar

Markdown correctly translates that in to:

1. Foo
2. Bar

(formatted as an ordered list). However, if you try to mix code in:

// 1. Foo
var foo = 1;
// 2. Bar
var bar = 2;

you will get the code on the right, and on the left you'll see:

1. Foo
1. Bar

this makes sense in Markdown terms because if you do regular Markdown of:

1. Foo
 anything else
2. Bar

Markdown will consider that to be two separate lists, not one list broken up.

However, what that translates to in Docco terms is that one can never use a decimal point-based list to spell out steps. You can't use hashes either, eg.:

#1 Do X
#2 Do Y

because that gets formatted as a header. So the only option I can see for doing lists in Docco is to use a parenthesis:

1)
2)

and since that just produces <p> tags it's difficult to style such a list.

While I realize that this might be difficult to implement (since Docco relies on Markdown), lists are a very useful thing to have when creating documentation, so please consider providing some sort of solution for them.

@machineghost
Copy link
Author

Quick follow up: I tried using HTML tags:

// <ol>
// <li>Foo
var foo = 1;
// <li>Bar
var bar = 2;
// </ol>

and that really doesn't work; the entire rest of the document (everything after "Bar") gets eaten.

@keithamus
Copy link
Collaborator

Because Docco calls marked once per block of documentation, rather than once per file each new document block is treated as its own markdown document. This should be fixed, it is actually a regression because this used to work.

The bug is actually a dupe of #268. Please follow that issue for updates.

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

2 participants