paritytech / polkadot-sdk

The Parity Polkadot Blockchain SDK
https://polkadot.network/
1.8k stars 652 forks source link

ADD CORRECTED PATH FOR `extrinsics.mmd` #5711

Closed zeel991 closed 2 weeks ago

zeel991 commented 2 weeks ago

This PR corrects the documentation path for the extrinsics.mmd file referenced in unchecked_extrinsics.rs.

The original code was referencing the file path incorrectly. The correct path is now provided as follows:

#[cfg_attr(all(feature = "std", not(windows)), doc = simple_mermaid::mermaid!("../../../../../docs/mermaid/extrinsics.mmd"))]

The file structure for the relevant files is as follows:

substrate-sdk/
├── docs/
│   └── mermaid/
│       └── extrinsics.mmd
└── substrate/
    └── primitives/
        └── runtime/
            └── src/
                └── generic/
                    └── unchecked_extrinsics.rs

This ensures that the documentation will correctly render the Mermaid diagram from the specified location in the code.

zeel991 commented 2 weeks ago

It is a symlink, so should do the same thing. It also renders correctly here: https://docs.rs/sp-runtime/39.0.0/sp_runtime/generic/struct.UncheckedExtrinsic.html

Where does it not render correcty?

Symlinks might not work correctly on Windows due to differences in how symlinks are handled. This could cause issues with rendering the documentation locally.