Skip to content

Commit

Permalink
fix: mdbook leftover anchors
Browse files Browse the repository at this point in the history
  • Loading branch information
julio4 committed Nov 3, 2024
1 parent 9c66018 commit 2493bc9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ Every listing needs to have atleast integration tests:

Add your contract in a specific file, you can name it `contract.cairo` or anything else. You can also add other files if needed.

You should add the tests in the same file as the contract, using the `#[cfg(test)]` flag and a `tests` module. With the usage of ANCHOR, the tests will not be displayed in the book but can be optionally be displayed by using the `{{#rustdoc_include ...}}` syntax.
You should add the tests in the same file as the contract, using the `#[cfg(test)]` flag and a `tests` module.
<!-- With the usage of ANCHOR, the tests will not be displayed in the book but can be optionally be displayed by using the `{{#rustdoc_include ...}}` syntax. -->

Here's a sample `lib.cairo` file:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub mod countable_component {
// [!endregion impl]
}

//ANCHOR_END: contract
// [!endregion contract]

#[starknet::contract]
mod MockContract {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//ANCHOR: contract
// [!region contract]
#[starknet::component]
pub mod countable_component {
use starknet::storage::{StoragePointerReadAccess, StoragePointerWriteAccess};
Expand Down Expand Up @@ -59,6 +59,6 @@ pub mod countable_component {
}
}
}
//ANCHOR_END: contract
// [!endregion contract]


0 comments on commit 2493bc9

Please sign in to comment.