GithubHelp home page GithubHelp logo

mdbook-classy's Introduction

To create with magic!

โญ

wuxianucw's GitHub stats

Top Langs

mdbook-classy's People

Contributors

dependabot[bot] avatar dhbradshaw avatar pkaminski avatar wuxianucw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mdbook-classy's Issues

Bug: Error when parsing markdown with a line holding a single character

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

Feature request: Classes for code blocks

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>

When building book classy breaks build

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.