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

Odd formatting differences of keywords in reference #50175

Closed
MLModel mannequin opened this issue May 4, 2009 · 6 comments
Closed

Odd formatting differences of keywords in reference #50175

MLModel mannequin opened this issue May 4, 2009 · 6 comments
Assignees
Labels
docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error

Comments

@MLModel
Copy link
Mannequin

MLModel mannequin commented May 4, 2009

BPO 5925
Nosy @birkenfeld, @MLModel, @bitdancer

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/birkenfeld'
closed_at = <Date 2009-05-04.20:42:37.990>
created_at = <Date 2009-05-04.19:12:04.990>
labels = ['type-bug', 'docs']
title = 'Odd formatting differences of keywords in reference'
updated_at = <Date 2009-05-04.20:42:37.988>
user = 'https://github.com/MLModel'

bugs.python.org fields:

activity = <Date 2009-05-04.20:42:37.988>
actor = 'georg.brandl'
assignee = 'georg.brandl'
closed = True
closed_date = <Date 2009-05-04.20:42:37.990>
closer = 'georg.brandl'
components = ['Documentation']
creation = <Date 2009-05-04.19:12:04.990>
creator = 'MLModel'
dependencies = []
files = []
hgrepos = []
issue_num = 5925
keywords = []
message_count = 6.0
messages = ['87153', '87159', '87160', '87162', '87163', '87167']
nosy_count = 3.0
nosy_names = ['georg.brandl', 'MLModel', 'r.david.murray']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'needs patch'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue5925'
versions = ['Python 3.0', 'Python 3.1']

@MLModel
Copy link
Mannequin Author

MLModel mannequin commented May 4, 2009

In the section at reference/lexical_analysis.html#keywords of the HTML
documentation some of the keywords are formatted differently from the
majority. In the HTML markup most of the keywords have CSS class 'k',
but others have 'n', 'nc', 'kn', 'nn', or 'ow'. I don't see any pattern
to which keywords are formatted which way, so I believe this should be
corrected. Or, if the differences are intentional they should be
documented. [Just trying to help clean up the doc -- I realize how
trivial this is.]

@MLModel MLModel mannequin assigned birkenfeld May 4, 2009
@MLModel MLModel mannequin added the docs Documentation in the Doc dir label May 4, 2009
@bitdancer
Copy link
Member

Whare are you seeing this? The online documentation doesn't use css
class names like the ones you mention as far as I can see.

@bitdancer
Copy link
Member

Woops, I was looking at the wrong page. I see it now.

@bitdancer
Copy link
Member

It looks like the py3 table is being colorized incorrectly. The rst
source code looks the same, so it must be some sort of difference in
configuration. I think I'll leave it to Georg to sort out :)

@bitdancer bitdancer added the type-bug An unexpected behavior, bug, or error label May 4, 2009
@bitdancer
Copy link
Member

A thought: there are additional keywords words in the Py3 table.
Perhaps Sphinx is using a heuristic to detect example blocks that are
python source code, and this one does not qualify in the py2 docs but
does qualify in the p3 docs. In the py2 docs the table is not colorized
at all.

@birkenfeld
Copy link
Member

Pygments' cleverness is detrimental here. It highlights module, class
and function names specially, therefore the identifiers after "class"
and "import" are differently colored.

I've made the table non-highlighted in 2 and 3, r72288.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants