-
Notifications
You must be signed in to change notification settings - Fork 352
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add incorrect code block support (#348)
This should resolve #343 by adding a shortcode that goes around code blocks that should be marked incorrect (`incorrect_code_block()`), highlights them in a dark red, and makes the left border red. Looks like this: <img width="1213" alt="Screen Shot 2022-04-16 at 4 50 25 PM" src="https://user-images.githubusercontent.com/1479994/163690976-77abfe98-fd71-4988-afcb-02e3be35491a.png"> from: ~~~markdown Just keep in mind that `&World` will conflict with _any_ mutable Query: {% incorrect_code_block() %} ```rust fn invalid_system(world: &World, transforms: Query<&mut Transform>) { } ``` {% end %} In these cases, consider using our new [ParamSets](/news/bevy-0-7/#paramsets) to resolve the conflict: ```rust fn valid_system(set: ParamSet<(&World, Query<&mut Transform>)>) { } ``` ~~~
- Loading branch information
Showing
3 changed files
with
163 additions
and
70 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<div class="incorrect"> | ||
{{ body | markdown | safe }} | ||
</div> |