-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disallow slashes (
/
) in void elements (#315)
# Overview The following syntax will no longer work: ```rust html! { br / link rel="stylesheet" href="styles.css" / } ``` This should be changed to the following: ```rust html! { br; link rel="stylesheet" href="styles.css"; } ``` # Rationale The `;` syntax was introduced in #96; the rationale for it can be found there. Removing support for the older `/` syntax will simplify the API surface, and allow for the space to be used for other things.
- Loading branch information
1 parent
317bf9e
commit dc6c88f
Showing
6 changed files
with
36 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
use maud::html; | ||
|
||
fn main() { | ||
html! { | ||
br / | ||
// Make sure we're not stopping on the first error | ||
input type="text" / | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
error: void elements must use `;`, not `/` | ||
--> $DIR/void-element-slash.rs:5:12 | ||
| | ||
5 | br / | ||
| ^ | ||
| | ||
= help: change this to `;` | ||
= help: see https://github.com/lambda-fairy/maud/pull/96 for details | ||
|
||
error: void elements must use `;`, not `/` | ||
--> $DIR/void-element-slash.rs:7:27 | ||
| | ||
7 | input type="text" / | ||
| ^ | ||
| | ||
= help: change this to `;` | ||
= help: see https://github.com/lambda-fairy/maud/pull/96 for details |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters