almereyda / mdbook-emoji

mdBook preprocessor that replaces straight quotes with curly quotes
Mozilla Public License 2.0
0 stars 2 forks source link

It won't compile :) #1

Open iAmMichaelConnor opened 2 years ago

iAmMichaelConnor commented 2 years ago

Hi :)

Thanks for building this! I tried installing it cargo install mdbook-emoji, but get the error:

error[E0061]: this function takes 2 arguments but 1 argument was supplied
   --> /mnt/user-data/mike/.cargo/registry/src/github.com-1ecc6299db9ec823/mdbook-emoji-0.2.1/src/preprocessor.rs:27:22
    |
27  |         let parser = mdbook::utils::new_cmark_parser(content);
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ------- supplied 1 argument
    |                      |
    |                      expected 2 arguments
    |
note: function defined here
   --> /mnt/user-data/mike/.cargo/registry/src/github.com-1ecc6299db9ec823/mdbook-0.4.15/src/utils/mod.rs:163:8
    |
163 | pub fn new_cmark_parser(text: &str, curly_quotes: bool) -> Parser<'_, '_> {
    |        ^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
  --> /mnt/user-data/mike/.cargo/registry/src/github.com-1ecc6299db9ec823/mdbook-emoji-0.2.1/src/preprocessor.rs:29:66
   |
29 |         let events = parser.map(|event| preprocess.convert_event(event));
   |                                                                  ^^^^^ expected enum `Event`, found enum `pulldown_cmark::Event`

Some errors have detailed explanations: E0061, E0308.
For more information about an error, try `rustc --explain E0061`.
error: failed to compile `mdbook-emoji v0.2.1`, intermediate artifacts can be found at `/tmp/cargo-installTNdza7`

Caused by:
  could not compile `mdbook-emoji` due to 2 previous errors

I'm using cargo version cargo 1.58.0 (f01b232bc 2022-01-19).

Has the mdbook interface changed, I wonder?

Cheers!

fsegurai commented 1 year ago

Same here

blyxyas commented 1 year ago

Same

blyxyas commented 1 year ago

Being that this crate is very inactive since and some people still need to solve this issue, I made my own solution. You can check it here