Skip to content

Fix keyword table #17855

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

Merged
merged 1 commit into from
Oct 8, 2014
Merged

Fix keyword table #17855

merged 1 commit into from
Oct 8, 2014

Conversation

steveklabnik
Copy link
Member

Markdown tables require a header, and we don't want one.

Fixes #17528

@alexcrichton
Copy link
Member

It's a little unfortunate to resort to raw HTML, could this be used instead?

|          |        |        |       |
|----------|--------|--------|-------|
| as       |        |        |       |
|          |        |        |       |
| box      | break  |        |       |
|          |        |        |       |
| continue | crate  |        |       |
|          |        |        |       |
| else     | enum   | extern |       |
|          |        |        |       |
| false    | fn     | for    |       |
|          |        |        |       |
| if       | impl   | in     |       |
|          |        |        |       |
| let      | loop   |        |       |
|          |        |        |       |
| match    | mod    | mut    |       |
|          |        |        |       |
| priv     | proc   | pub    |       |
|          |        |        |       |
| ref      | return |        |       |
|          |        |        |       |
| self     | static | struct | super |
|          |        |        |       |
| trait    | true   | type   |       |
|          |        |        |       |
| unsafe   | use    |        |       |
|          |        |        |       |
| while    |        |        |       |
|          |        |        |       |

That renders as a table in rustdoc locally for me

@alexcrichton
Copy link
Member

You could probably delete some of the blank rows as well

@steveklabnik
Copy link
Member Author

See the above screenshot, it makes the output look gross :(

EDIT: by 'above' i mean 'in the original ticket'

@steveklabnik
Copy link
Member Author

If you don't have the same number of tds, it recenters them per line, which makes the output look ugly.

Markdown tables require a header, and we don't want one.

Fixes rust-lang#17528
@mahkoh
Copy link
Contributor

mahkoh commented Oct 7, 2014

Time to advocate asciidoc:

|=====================================
| as       |        |        |       |
| box      | break  |        |       |
| continue | crate  |        |       |
| else     | enum   | extern |       |
| false    | fn     | for    |       |
| if       | impl   | in     |       |
| let      | loop   |        |       |
| match    | mod    | mut    |       |
| priv     | proc   | pub    |       |
| ref      | return |        |       |
| self     | static | struct | super |
| trait    | true   | type   |       |
| unsafe   | use    |        |       |
| while    |        |        |       |
|=====================================

produces the expected output.

@steveklabnik
Copy link
Member Author

I pushed a commit with the alternative fix we talked about in IRC https://botbot.me/mozilla/rust-internals/2014-10-07/?msg=23049256&page=7

@@ -187,6 +187,8 @@ grammar as double-quoted strings. Other tokens have exact rules given.

The keywords are the following strings, organized by first letter:

<div id="keywords">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the contents actually rendered as a table? I was under the impression that markdown was not processed inside HTML tags.

bors added a commit that referenced this pull request Oct 8, 2014
…richton

Markdown tables require a header, and we don't want one.

Fixes #17528
@bors bors closed this Oct 8, 2014
@bors bors merged commit 3610f8f into rust-lang:master Oct 8, 2014
@steveklabnik steveklabnik deleted the fix_table_reference branch October 25, 2017 18:26
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

Successfully merging this pull request may close these issues.

Keyword table in the language reference is not rendered correctly
5 participants