Skip to content

Commit fd514b9

Browse files
author
bors-servo
authored
Auto merge of #283 - jimblandy:master, r=jdm
Fix doc formatting for markup5ever::interface::QualName. The documentation for `QualName` uses fenced code blocks (the ones that start with three backticks) incorrectly, so that the fence and the `ignore` directive ends up included in the documentation text. ![image](https://user-images.githubusercontent.com/751272/27651309-bbc70e42-5bec-11e7-94df-7e6848ded802.png) Fenced code blocks must be separated from the preceding paragraph by a blank line. This also adds some punctuation and tries to demangle some grammar. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/html5ever/283) <!-- Reviewable:end -->
2 parents 5081b2c + e8be5b0 commit fd514b9

File tree

1 file changed

+31
-28
lines changed

1 file changed

+31
-28
lines changed

markup5ever/interface/mod.rs

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -61,44 +61,47 @@ pub mod tree_builder;
6161
#[cfg_attr(feature = "heap_size", derive(HeapSizeOf))]
6262
/// Fully qualified name. Used to depict names of tags and attributes.
6363
///
64-
/// Used to differentiate between similar XML fragments. For example
64+
/// Used to differentiate between similar XML fragments. For example:
65+
///
6566
/// ```ignore
66-
/// // HTML
67-
/// <table>
68-
/// <tr>
69-
/// <td>Apples</td>
70-
/// <td>Bananas</td>
71-
/// </tr>
72-
/// </table>
67+
/// // HTML
68+
/// <table>
69+
/// <tr>
70+
/// <td>Apples</td>
71+
/// <td>Bananas</td>
72+
/// </tr>
73+
/// </table>
7374
///
74-
/// // Furniture XML
75-
/// <table>
76-
/// <name>African Coffee Table</name>
77-
/// <width>80</width>
78-
/// <length>120</length>
79-
/// </table>
75+
/// // Furniture XML
76+
/// <table>
77+
/// <name>African Coffee Table</name>
78+
/// <width>80</width>
79+
/// <length>120</length>
80+
/// </table>
8081
/// ```
81-
/// Without XML namespaces we can't use those two fragments in occur
82-
/// XML at same time. however if we declare a namespace we could instead say:
82+
///
83+
/// Without XML namespaces, we can't use those two fragments in the same document
84+
/// at the same time. However if we declare a namespace we could instead say:
8385
///
8486
/// ```ignore
85-
/// // Furniture XML
86-
/// <furn:table>
87-
/// <furn:name>African Coffee Table</furn:name>
88-
/// <furn:width>80</furn:width>
89-
/// <furn:length>120</furn:length>
90-
/// </furn:table>
87+
/// // Furniture XML
88+
/// <furn:table>
89+
/// <furn:name>African Coffee Table</furn:name>
90+
/// <furn:width>80</furn:width>
91+
/// <furn:length>120</furn:length>
92+
/// </furn:table>
9193
/// ```
94+
///
9295
/// and bind it to a different name.
9396
///
94-
/// For this reason we parse names that contain a colon in the following way
97+
/// For this reason we parse names that contain a colon in the following way:
9598
///
9699
/// ```ignore
97-
/// < furn:table>
98-
/// | |
99-
/// | +- local name
100-
/// |
101-
/// prefix (when resolved gives namespace_url)
100+
/// <furn:table>
101+
/// | |
102+
/// | +- local name
103+
/// |
104+
/// prefix (when resolved gives namespace_url)
102105
/// ```
103106
pub struct QualName {
104107
pub prefix: Option<Prefix>,

0 commit comments

Comments
 (0)