Link to structs and enums in docs

This commit is contained in:
ConnorSkees 2020-01-09 20:56:09 -05:00
parent a74d22cce9
commit 31b0ea6b34

View File

@ -103,9 +103,9 @@ pub struct StyleSheet {
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum Stmt {
/// A style: `color: red`
/// A [`Style`](/grass/style/struct.Style)
Style(Style),
/// An entire `[RuleSet](crate::RuleSet)`
/// A [`RuleSet`](/grass/struct.RuleSet.html)
RuleSet(RuleSet),
/// A multiline comment: `/* foo bar */`
MultilineComment(String),
@ -490,9 +490,13 @@ mod test_css {
"a {\n /* foo */\n /* bar */\n color: red;\n}\n"
);
test!(
preserves_toplevel_comment,
preserves_toplevel_comment_before,
"/* foo */\na {\n color: red;\n}\n"
);
test!(
preserves_toplevel_comment_after,
"a {\n color: red;\n}\n/* foo */\n"
);
test!(
removes_single_line_comment,
"// a { color: red }\na {\n height: 1 1px;\n}\n",