โญ
wuxianucw / mdbook-classy Goto Github PK
View Code? Open in Web Editor NEWParagraph css class annotation for mdbook
License: MIT License
Paragraph css class annotation for mdbook
License: MIT License
The syntax
- [ ] Mercury
- [x] Venus
- [x] Earth (Orbit/Moon)
- [x] Mars
- [ ] Jupiter
- [ ] Saturn
- [ ] Uranus
- [ ] Neptune
- [ ] Comet Haley
Should render as checked boxes, but instead is rendered as a list with []
and [x]
as text in the list
Error on line 63 when a paragraph has only one character. This error also occurs when using this preprocessor when using mathjax with \\[ \\]
notation.
Fix suggestion: check the length of v
in the code and skip if the length is below 3 ({:.
will always have length three at least)
Error:
2020-12-23 21:19:29 [INFO] (mdbook::book): Book building has started
thread 'main' panicked at 'range end index 4 out of range for slice of length 3', /Users/Jack/.cargo/registry/src/github.com-1ecc6299db9ec823/mdbook-classy-0.1.0/src/main.rs:63:28
With backtrace
stack backtrace:
0: 0x106d3a6f4 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hcfc48256a5ab8835
1: 0x106d567d0 - core::fmt::write::haf3903118f694c48
2: 0x106d37ef6 - std::io::Write::write_fmt::h7385463ac87804ed
3: 0x106d3c07f - std::panicking::default_hook::{{closure}}::h91bd4c58cf71392b
4: 0x106d3bd4d - std::panicking::default_hook::h7bd29c87df967048
5: 0x106d3c64b - std::panicking::rust_panic_with_hook::hae2b05f08a320721
6: 0x106d3c1cb - std::panicking::begin_panic_handler::{{closure}}::h72d68d3a77e0b718
7: 0x106d3ab68 - std::sys_common::backtrace::__rust_end_short_backtrace::h7c5e286792f94edb
8: 0x106d3c18a - _rust_begin_unwind
9: 0x106d61bff - core::panicking::panic_fmt::h1b194bb80d76fb10
10: 0x106d61cd6 - core::slice::index::slice_end_index_len_fail::h9c91a6e341c5e60d
11: 0x106c99991 - mdbook_classy::classy::h20132e26614fd034
12: 0x106caefaf - mdbook::book::book::for_each_mut::h1dcc1707e806c7fd
13: 0x106c9a026 - mdbook_classy::main::h88faa56222a819c0
14: 0x106c949fa - std::sys_common::backtrace::__rust_begin_short_backtrace::h5cc3fe6f22de8c5a
15: 0x106cae9fc - std::rt::lang_start::{{closure}}::ha888bbd48f368a5d
16: 0x106d3c9c4 - std::rt::lang_start_internal::hd38bb63f9540b327
Several md features are broken with this preprocessor including:
mdbook v0.4.31
Would it be possible to add classes to code blocks as well?
Currently when I try this:
{:.foo}
```
test
```
It will result in this html:
<div class="foo">
</div>
<pre><code>test
</code></pre>
Hi,
When building a book an error is thrown and breaks the build. This is what i get below.
2022-10-26 19:08:13 [INFO] (mdbook::cmd::serve): Building book...
2022-10-26 19:08:13 [INFO] (mdbook::book): Book building has started
thread 'main' panicked at 'range end index 4 out of range for slice of length 3', library\core\src\slice\index.rs:73:5
note: run with RUST_BACKTRACE=1
environment variable to display a backtrace
2022-10-26 19:08:13 [ERROR] (mdbook::cmd::serve): Unable to load the book
2022-10-26 19:08:13 [ERROR] (mdbook::utils): Error: The "classy" preprocessor exited unsuccessfully with exit code: 10
Any help would be appreciated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.