mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Move documentation table stylining to a shared location.
This commit is contained in:
parent
fe3634038c
commit
a2c6d23610
3 changed files with 15 additions and 8 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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 | , | |
|
||||
|
|
8
src/etc/rustdoc-style.html
Normal file
8
src/etc/rustdoc-style.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
<style>
|
||||
.docblock table {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.docblock table th, .docblock table td {
|
||||
border: 1px solid #888;
|
||||
}
|
||||
</style>
|
Loading…
Add table
Add a link
Reference in a new issue