We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
when i include code using {{ #include <path> }} it does't produce valid output.
{{ #include <path> }}
mkdir dsa
cd dsa
mdbook init
book.toml
[book] authors = ["BiswajitThakur"] language = "en" multilingual = false src = "src" title = "DSA Rust"
src/SUMMARY.md
# Summary - [Chapter 1](./chapter_1.md)
src/chapter_1.md
# Chapter 1 - This is demo ```rust {{ #include ./../code/linear_search.rs }} ``` - Hello World
code/linear_search.rs
pub fn linear_search<T: PartialEq>(arr: &[T], value: &T) -> Option<usize> { let mut i = 0; while i < arr.len() { if &arr[i] == value { return Some(i); } i += 1; } None } #[test] fn test_linear_search() { let arr = [1, 3, 5, 7, 9, 11, 15]; assert_eq!(linear_search(&arr, &1), Some(0)); assert_eq!(linear_search(&arr, &3), Some(1)); assert_eq!(linear_search(&arr, &5), Some(2)); assert_eq!(linear_search(&arr, &11), Some(5)); assert_eq!(linear_search(&arr, &15), Some(6)); assert_eq!(linear_search(&arr, &0), None); assert_eq!(linear_search(&arr, &-1), None); assert_eq!(linear_search(&arr, &-3), None); let arr1 = [1.5, 77.8, -5.3, 1.3, -9.0, 2.5, 5.3]; assert_eq!(linear_search(&arr1, &1.5), Some(0)); assert_eq!(linear_search(&arr1, &-5.3), Some(2)); assert_eq!(linear_search(&arr1, &2.5), Some(5)); assert_eq!(linear_search(&arr1, &-9.0), Some(4)); assert_eq!(linear_search(&arr1, &0.0), None); assert_eq!(linear_search(&arr1, &1.4), None); }
<no space>```rust <no space>{{ #include ./../code/linear_search.rs }} <no space>```
<2 space>```rust <2 space>{{ #include ./../code/linear_search.rs }} <2 space>```
No response
$ mdbook --version mdbook v0.4.43
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Problem
when i include code using
{{ #include <path> }}
it does't produce valid output.
Steps
mkdir dsa
cd dsa
mdbook init
book.toml
src/SUMMARY.md
src/chapter_1.md
code/linear_search.rs
Possible Solution(s)
Notes
No response
Version
The text was updated successfully, but these errors were encountered: