Skip to content

Commit

Permalink
fix doc include path resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
ccbrown committed Sep 23, 2024
1 parent 57de1a8 commit 26e5d48
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions packages/iocraft-macros/examples
4 changes: 2 additions & 2 deletions packages/iocraft-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ impl ToTokens for ParsedComponent {
/// Custom components are defined by adding this macro to a function that returns an `Element`:
///
/// ```no_run
#[doc = include_str!("../../../examples/counter.rs")]
#[doc = include_str!("../examples/counter.rs")]
/// ```
///
/// The function is allowed to take up to two arguments, one named `props`, for the component's
Expand All @@ -392,7 +392,7 @@ impl ToTokens for ParsedComponent {
/// Here is an example of a component that takes a reference to a `Vec` of `User` structs via properties:
///
/// ```
#[doc = include_str!("../../../examples/table.rs")]
#[doc = include_str!("../examples/table.rs")]
/// ```
#[proc_macro_attribute]
pub fn component(_attr: TokenStream, item: TokenStream) -> TokenStream {
Expand Down
1 change: 1 addition & 0 deletions packages/iocraft/examples
4 changes: 2 additions & 2 deletions packages/iocraft/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
//! Here's your first `iocraft` program:
//!
//! ```
#![doc = include_str!("../../../examples/hello_world.rs")]
#![doc = include_str!("../examples/hello_world.rs")]
//! ```
//!
//! Your UI is composed primarily via the [`element!`] macro, which allows you to declare your UI
Expand All @@ -36,7 +36,7 @@
//! which increments every 100ms:
//!
//! ```no_run
#![doc = include_str!("../../../examples/counter.rs")]
#![doc = include_str!("../examples/counter.rs")]
//! ```
//!
//! ## More Examples
Expand Down

0 comments on commit 26e5d48

Please sign in to comment.