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

Improper rendering of enumerated lists in reStructuredText #390

Closed
KrzysiekJ opened this issue Nov 7, 2014 · 4 comments
Closed

Improper rendering of enumerated lists in reStructuredText #390

KrzysiekJ opened this issue Nov 7, 2014 · 4 comments

Comments

@KrzysiekJ
Copy link

I’m reraising the issues #221 and #225 with an intention to reconsider fixing this bug. Github often renders enumerated lists in RST files improperly; for example, lower-alpha lists may be rendered as lower-roman. If this applied only to software documentation, it would be only a minor inconvenience. However, I have a legal text (a statute of a political party) in which this is obviously important. For example, if someone refers to point 4. d) of the text, the reader on Github will need to search for point 4. iii) and he will get confused. Therefore it is hard to „officially” reference this file. (This does not apply to pull requests, commits and raw text since those operate on unparsed markup). And of course the legal text itself will not be changed only because Github renders it incorrectly. Since legal texts are welcome on Github, I guess this issue should deserve non-zero priority, or at least deeper consideration.

I can see from experimenting on the tests that this repository actually renders enumerated lists properly – lower-alpha list is rendered as <ol class="loweralpha simple">. So I guess that the real issue is stripping this CSS class somewhere on a higher level.

@bkeepers
Copy link
Contributor

bkeepers commented Nov 7, 2014

Hi @KrzysiekJ. Thanks for bringing this up again! You make a really great point. RST offers a lot more options than other markup languages, so unfortunately it gets crippled as we try to optimize for the least common denominator.

As you point out, github/markup actually renders the output correctly, but the classes get sanitized out by the SanitizationFilter. Since we can't fix this problem in this repo, I'm going to close this issue, but I will bring this up with our design team.

Also, /cc @benbalter @ymendel who may be interested.

@bkeepers bkeepers closed this as completed Nov 7, 2014
@KrzysiekJ
Copy link
Author

Since the issue seems to be still unresolved, is it possible that you at least change the CSS rule saying that nested enumerated lists should be rendered as lower roman – to rendering them as lower alpha? It will only require changing the rule

ol ol, ul ol {
    list-style-type: lower-roman;
}

to

ol ol, ul ol {
    list-style-type: lower-alpha;
}

It will not, obviously, solve the problem in a general way, but at least it will offer a much saner default – lower roman lists are probably very uncommon. (And it will solve the issue for my particular repository).

Cc @bkeepers , @benbalter , @ymendel , @gjtorikian

@bkeepers
Copy link
Contributor

I brought it up with our team again. My guess is that the use of roman numerals at the second level is intentional, but I'll let you know what I find out.

Here's an example of deeply nested lists:


comparing_master___nested-ols_ _primer_user-content

@KrzysiekJ
Copy link
Author

Roman numerals at the second level were introduced by fixing the issue #221 which was reported by me, but that was actually not the change I requested (I reported that in #225). Previously, second level had been rendered as lower arabic numbers (similarly as first level).

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