Move documentation table stylining to a shared location.

This commit is contained in:
Simon Sapin 2014-08-04 17:03:25 +01:00
parent fe3634038c
commit a2c6d23610
3 changed files with 15 additions and 8 deletions

View file

@ -2,6 +2,11 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
RUSTDOC_HTML_IN_HEADER = $(S)/src/etc/rustdoc-style.html
RUSTDOC_FLAGS = --html-in-header $(RUSTDOC_HTML_IN_HEADER)
RUSTDOC_DEPS = $(RUSTDOC_HTML_IN_HEADER)
# FIXME(#2924) These crates make rustdoc fail for undetermined reasons.
DOC_BLACKLISTED := style
@ -11,9 +16,9 @@ doc-$(1): doc/$(1)/index.html
ifeq (,$(filter $(1),$(DOC_BLACKLISTED)))
doc/$(1)/index.html: $$(DEPS_$(1))
doc/$(1)/index.html: $$(DEPS_$(1)) $$(RUSTDOC_DEPS)
@$$(call E, rustdoc: $$@)
$$(Q)$$(RUSTDOC) $$(RFLAGS_$(1)) $$<
$$(Q)$$(RUSTDOC) $$(RUSTDOC_FLAGS) $$(RFLAGS_$(1)) $$<
else

View file

@ -84,8 +84,6 @@ pub struct Line {
///
/// The ranges that describe these lines would be:
///
/// <style>.content style ~ table th, style ~ table td { border: 1px solid #888 }
/// .content style ~ table { border-collapse: collapse }</style>
/// | [0.0, 1.4) | [1.5, 2.0) | [2.0, 3.4) | [3.4, 4.0) |
/// |------------|-------------|-------------|------------|
/// | 'I like' | 'truffles,' | '<img> yes' | 'I do.' |
@ -164,8 +162,6 @@ pub struct LineIndices {
///
/// The fragments would be indexed as follows:
///
/// <style>.content style ~ table th, style ~ table td { border: 1px solid #888 }
/// .content style ~ table { border-collapse: collapse }</style>
/// | 0 | 1 | 2 | 3 |
/// |------|------------------|---------|--------------|
/// | 'I ' | 'like truffles,' | `<img>` | ' yes I do.' |
@ -182,8 +178,6 @@ pub struct LineIndices {
///
/// The characters would be indexed as follows:
///
/// <style>.content style ~ table th, style ~ table td { border: 1px solid #888 }
/// .content style ~ table { border-collapse: collapse }</style>
/// | 0 | 1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
/// |---|---|---|---|---|---|---|---|---|---|---|---|----|----|----|----|----|
/// | I | | l | i | k | e | | t | r | u | f | f | l | e | s | , | |

View file

@ -0,0 +1,8 @@
<style>
.docblock table {
border-collapse: collapse;
}
.docblock table th, .docblock table td {
border: 1px solid #888;
}
</style>