From a2c6d23610db1cd68eabcc51dd67f480458ed205 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Mon, 4 Aug 2014 17:03:25 +0100 Subject: [PATCH] Move documentation table stylining to a shared location. --- mk/doc.mk | 9 +++++++-- src/components/layout/inline.rs | 6 ------ src/etc/rustdoc-style.html | 8 ++++++++ 3 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 src/etc/rustdoc-style.html diff --git a/mk/doc.mk b/mk/doc.mk index 4fe35efe8ea..df0f2ade9f5 100644 --- a/mk/doc.mk +++ b/mk/doc.mk @@ -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 diff --git a/src/components/layout/inline.rs b/src/components/layout/inline.rs index 311b9580275..94b2d46b8e8 100644 --- a/src/components/layout/inline.rs +++ b/src/components/layout/inline.rs @@ -84,8 +84,6 @@ pub struct Line { /// /// The ranges that describe these lines would be: /// - /// /// | [0.0, 1.4) | [1.5, 2.0) | [2.0, 3.4) | [3.4, 4.0) | /// |------------|-------------|-------------|------------| /// | 'I like' | 'truffles,' | ' yes' | 'I do.' | @@ -164,8 +162,6 @@ pub struct LineIndices { /// /// The fragments would be indexed as follows: /// - /// /// | 0 | 1 | 2 | 3 | /// |------|------------------|---------|--------------| /// | 'I ' | 'like truffles,' | `` | ' yes I do.' | @@ -182,8 +178,6 @@ pub struct LineIndices { /// /// The characters would be indexed as follows: /// - /// /// | 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 | , | | diff --git a/src/etc/rustdoc-style.html b/src/etc/rustdoc-style.html new file mode 100644 index 00000000000..bd4d0cc11cd --- /dev/null +++ b/src/etc/rustdoc-style.html @@ -0,0 +1,8 @@ +