Giter Club home page Giter Club logo

comrak's Introduction

Welcome

Hi there!

Digital design

  • Niar amaranth python -- framework for building Amaranth projects
  • Sae amaranth -- RV32I softcore
  • ili9341spi amaranth zig driver -- previous testbed for Niar: ILI9341 SPI LCD driver, plus virtual hardware testbench
  • zxxrtl yosys zig -- bindings to Yosys' CXXRTL for Zig

CommonMark

  • Comrak rust library -- GitHub Flavored Markdown implementation, used by Reddit, docs.rs, crates.io, and many more
  • gjtorikian/commonmarker ruby library -- GitHub Flavored Markdown implementation; wraps Comrak in 1.x series
  • koino zig library -- GitHub Flavored Markdown implementation (port of Comrak)

Misc

  • vyxos nix -- My laptop and server Nix configuration.
  • htmlentities.zig zig library -- HTML entity data
  • libpcre.zig zig library -- bindings to libpcre
  • furpoll nix furry -- polls your FurAffinity for notes and emails you about it

Archived

I only have so much time. Please feel free to write to me if you have any questions, or if you're interested in adopting a project!

Digital design

  • Chryse chisel scala -- framework for building Chisel projects
  • sh1107 amaranth zig driver -- (WIP) SH1107 OLED driver, plus the I²C driver it uses, with virtual hardware testbench
  • i2c_obs amaranth tool -- (WIP) I²C clock stretcher
  • hdx amaranth nix -- development environment for HDL

Kernel/embedded

  • daintree zig kernel -- ARMv8-A and RV64GS kernel and UEFI bootloader
  • dtb.zig zig library -- device tree blob (flattened device tree) parser
  • armv8a ruby tool -- some calculators to help with ARMv8a debugging
  • akari c++ kernel -- baby's first Real C++ microkernel (antique)

CommonMark

Misc

Forks

Spirited away

Thanks to my co-authors. :)

Who?

  • Asherah (or Ashe) is my primary name.
  • Charlotte (@charlottia) was our working name while starting out with gateware and Nix, and sometimes still is. :)
  • Amelia is an other name which is still seen in plenty of places, but it's being phased out.

comrak's People

Contributors

arvinskushwaha avatar ayosec avatar bioinformatist avatar brson avatar crowdagger avatar dependabot[bot] avatar digitalmoksha avatar edwardloveall avatar eklipse2k8 avatar felipesere avatar github-actions[bot] avatar gjtorikian avatar helmet91 avatar ignatenkobrain avatar jrmiller82 avatar kaesluder avatar keats avatar killercup avatar kivikakk avatar liamwhite avatar lucperkins avatar meow avatar mfontanini avatar mikeando avatar philipturnbull avatar sunjay avatar tranzystorekk avatar turbo87 avatar vpetrigo avatar yjdoc2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

comrak's Issues

<number>. don't render as table td.

I've notice that this renders badly

Number | Tag | Description
-------|-----|---------
1.     | CC  | Coordinating conjunction
2.     | CD  | Cardinal number
3.     | DT  | Determiner
4.     | EX  | Existential there

as

Number Tag Description
  1. | CC  | Coordinating conjunction
    
  2. | CD  | Cardinal number
    
  3. | DT  | Determiner
    
  4. | EX  | Existential there
    

And it's not unique to comrak, but to gfm as well as the render take effect in this github issue

If you remove the . right after the numbers, it renders fine.

Number | Tag | Description
-------|-----|---------
1     | CC  | Coordinating conjunction
2     | CD  | Cardinal number
3     | DT  | Determiner
4     | EX  | Existential there
Number Tag Description
1 CC Coordinating conjunction
2 CD Cardinal number
3 DT Determiner
4 EX Existential there

pulldown-cmark renders both nicely. Is this an intended behaviour in gfm specification?

footnotes plus superscript interact weirdly

From the title you can probably tell that this is related to #58.

The documentation for ext_footnotes has this example:

let options = ComrakOptions {
  ext_footnotes: true,
  ..ComrakOptions::default()
};
assert_eq!(markdown_to_html("Hi[^x].\n\n[^x]: A greeting.\n", &options),
           "<p>Hi<sup class=\"footnote-ref\"><a href=\"#fn1\" id=\"fnref1\">1</a></sup>.</p>\n<section class=\"footnotes\">\n<ol>\n<li id=\"fn1\">\n<p>A greeting. <a href=\"#fnref1\" class=\"footnote-backref\">↩</a></p>\n</li>\n</ol>\n</section>\n");

However, this does not work when you also have ext_superscript enabled.

use comrak::*;

fn main() {
    let options = ComrakOptions {
        ext_superscript: true,
        ext_footnotes: true,
      ..ComrakOptions::default()
    };
    assert_eq!(markdown_to_html("Hi[^x].\n\n[^x]: A greeting.\n", &options),
               "<p>Hi<sup class=\"footnote-ref\"><a href=\"#fn1\" id=\"fnref1\">1</a></sup>.</p>\n<section class=\"footnotes\">\n<ol>\n<li id=\"fn1\">\n<p>A greeting. <a href=\"#fnref1\" class=\"footnote-backref\">↩</a></p>\n</li>\n</ol>\n</section>\n");
}

Instead of the expected string, you just get "<p>Hi[^x].</p>\n".

O(n^2) for link reference definitions

$ time python -c 'print("[a]: u\n" * 10000)' | ./target/release/comrak >/dev/null
real    0m0.166s
user    0m0.164s
sys     0m0.003s

$ time python -c 'print("[a]: u\n" * 20000)' | ./target/release/comrak >/dev/null
real    0m0.631s
user    0m0.631s
sys     0m0.001s

$ time python -c 'print("[a]: u\n" * 40000)' | ./target/release/comrak >/dev/null
real    0m2.482s
user    0m2.481s
sys     0m0.002s

Don't expose type_arena

In the example:

let arena = Arena::new();

let root = parse_document(
    &arena,
    "This is my input.\n\n1. Also my input.\n2. Certainly my input.\n",
    &ComrakOptions::default());

type_arena is exposed, but not really manipulated by the library user. Shouldn't be there a function which instantiate a default arena object on itself while still be able to do the advance features like search replace. Library users can then just use something like

let root = parse_document_default_arena(
    "This is my input.\n\n1. Also my input.\n2. Certainly my input.\n",
    &ComrakOptions::default());

comrak compiler error with Rust 1.26

When using comrak with rust version 1.26 and compiling my project with cargo run on windows 10, I get this error #[derive(Parser)] not a function. The error appears to originate in line 8 of your scanners.rs file.

The compiler gives further info saying that the derive attribute should be applied to a function.

Below is the rust compiler's full explanation of this particular error:

This error indicates that an #[inline(..)] attribute was incorrectly placed
on something other than a function or method.

Examples of erroneous code:

#[inline(always)]
struct Foo;

#[inline(never)]
impl Foo {
    // ...
}

#[inline] hints the compiler whether or not to attempt to inline a method or
function. By default, the compiler does a pretty good job of figuring this out
itself, but if you feel the need for annotations, #[inline(always)] and
#[inline(never)] can override or force the compiler's decision.

If you wish to apply this attribute to all methods in an impl, manually annotate
each method; it is not possible to annotate the entire impl with an #[inline]
attribute.

I'm new to rust, but I will see what I can do to resolve this particular error. I will open a PR if I reach a solution.

P.S. An interesting thing to note is that comrak compiles with cargo run without incident on Rust version 1.25, so I'm not sure if the latest version of Rust broke something or if the Parser library you use broke in a recent update.

Process broken links

In markdown, you can have links separate from their URLs like this:

A link to [github].

[github]: https://github.com/

When you process this with comrak, it produces the expected NodeValue::Link with the appropriate URL provided at the bottom. This is great!

However, when you try the same thing with a broken link:

A link to [github].

Comrak will produce a regular NodeValue::Text node with the verbatim text "[github]". This behaviour is correct and expected, but it makes it difficult to implement features that would otherwise replace this link with something else.

For example, the "Rust Intra-rustdoc links" feature would not be able to have "Implied Shortcut Reference Links" with the way things are today.

I am working on something that needs the ability to resolve broken links like this instead of having them turn into text. Would it be possible to add something like that to comrak? (The thing I'm working on is not intra-rustdoc links, that was just an example of why this is useful.)

The pulldown-cmark crate handles this with a method called new_with_broken_link_callback which lets you call a callback whenever the parser encounters any potential links that have a broken reference.

I'm not sure what the best approach for comrak would be, but this may give you some inspiration.

Thanks for such a great library! 😄

Parser::feed looks like it incorrectly accepts invalid unicode

Comrak is structured to assume its buffers are valid unicode - it is calling str::from_utf8_unchecked in multiple places, but Parser::feed appears to blindly accept raw byte buffers. It is though replacing \0, which is not a valid utf-8 byte, with the unicode replacement character, but I don't see where comrak is otherwise validating that feed receives utf-8.

It looks to me like if someone fed this function invalid unicode (other than \0) that comrak would create invalid unicode strings.

The feed function would probably be safer if it accpeted &str, punting the unicode validation to the caller. Or alternately it could validate unicode is it goes for a cost.

How to preprocess markdown?

Say, I have a tag audio, video, image or whatever and I want to dynamically adjust it's "source" before rendering it on an html page. Does comrak provide an api for an element to do so?

Table header beginning with named anchor results in `panic()`

Minimal repro with table extension enabled:

[a
]: a
-|-:

A table following a named anchor on a single line, however, does not cause a panic():

[a]: a
-|-:

Backtrace:

$ RUST_BACKTRACE=1 ./target/debug/comrak --to html --extension table table-crash.md 
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /checkout/src/libcore/option.rs:335:20
stack backtrace:
   0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
             at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::_print
             at /checkout/src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at /checkout/src/libstd/sys_common/backtrace.rs:60
             at /checkout/src/libstd/panicking.rs:381
   3: std::panicking::default_hook
             at /checkout/src/libstd/panicking.rs:397
   4: std::panicking::rust_panic_with_hook
             at /checkout/src/libstd/panicking.rs:611
   5: std::panicking::begin_panic
             at /checkout/src/libstd/panicking.rs:572
   6: std::panicking::begin_panic_fmt
             at /checkout/src/libstd/panicking.rs:522
   7: rust_begin_unwind
             at /checkout/src/libstd/panicking.rs:498
   8: core::panicking::panic_fmt
             at /checkout/src/libcore/panicking.rs:71
   9: core::panicking::panic
             at /checkout/src/libcore/panicking.rs:51
  10: <core::option::Option<T>>::unwrap
             at /checkout/src/libcore/macros.rs:32
  11: comrak::parser::Parser::add_text_to_container
             at src/parser/mod.rs:850
  12: comrak::parser::Parser::process_line
             at src/parser/mod.rs:351
  13: comrak::parser::Parser::feed
             at src/parser/mod.rs:265
  14: comrak::parser::parse_document
             at src/parser/mod.rs:43
  15: comrak::main
             at src/main.rs:139
  16: __rust_maybe_catch_panic
             at /checkout/src/libpanic_unwind/lib.rs:98
  17: std::rt::lang_start
             at /checkout/src/libstd/panicking.rs:459
             at /checkout/src/libstd/panic.rs:361
             at /checkout/src/libstd/rt.rs:61
  18: main
  19: __libc_start_main
  20: <unknown>

As far as I can tell, this is because we end up with a NodeValue::Table that has no parent, and panics during the .unwrap() when node.parent() is returned from Parser::finalize_borrowed.

Exclamation before a footnote gets eaten

Same as github/cmark-gfm#66.

~/kivikakk/comrak master$ target/debug/comrak --footnotes <<EOT
> Hi![^hi]
>
> [^hi]: OK.
> EOT
<p>Hi<sup class="footnote-ref"><a href="#fn1" id="fnref1">[1]</a></sup></p>
<section class="footnotes">
<ol>
<li id="fn1">
<p>OK. <a href="#fnref1" class="footnote-backref">↩</a></p>
</li>
</ol>
</section>

Common extensions

  • Task lists (#8)
  • Footnotes (#11) I think it's not appropriate.
  • Superscript (#10)
  • No intra-emphasis CommonMark does this better by default.

HTML boilerplate

Hi!

I am assuming it is intentional that the generated HTML is not a full HTML5 document.
By full, I mean embedded in some kind of template similar to:

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
...
</html>

For me this is important, because without charset="UTF-8" the browser does not render german umlauts correctly.

Is HTML document generation in scope of comrak?
If not, do you happen to have some tips how to script this?

cargo install fails with `Self` struct constructors are unstable

I've been happily using v0.4.0 since it came out (great project!) but when I try to build a more recent version (e.g. v0.4.1. or v0.5.0), cargo fails with an error:

error[E0658]: `Self` struct constructors are unstable (see issue #51994)                                                                               
  --> /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/comrak-0.4.1/src/html.rs:73:9                                                      
   |                                                                                                                                                   
73 |         Self(HashSet::new())                                                                                                                      
   |         ^^^^                                                                                                                        

The issue mentioned in the error message doesn't help me avoid this.

Detailed output from attempting to install v0.4.1 is below:

$ cargo install comrak --force --verbose --version 0.4.1
    Updating crates.io index
  Installing comrak v0.4.1                                                                                                                             
   Compiling proc-macro2 v0.4.27                                                                                                                       
   Compiling unicode-xid v0.1.0                                                                                                                        
     Running `rustc --crate-name unicode_xid /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/unicode-xid-0.1.0/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' -C metadata=5fa0ac7939e7f58b -C extra-filename=-5fa0ac7939e7f58b --out-dir /tmp/cargo-installWCrlbH/release/deps -L dependency=/tmp/cargo-installWCrlbH/release/deps --cap-lints allow`
     Running `rustc --crate-name build_script_build /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.4.27/build.rs --color always --crate-type bin --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' --cfg 'feature="proc-macro"' -C metadata=495c354e6dc247ee -C extra-filename=-495c354e6dc247ee --out-dir /tmp/cargo-installWCrlbH/release/build/proc-macro2-495c354e6dc247ee -L dependency=/tmp/cargo-installWCrlbH/release/deps --cap-lints allow`
   Compiling memchr v2.2.0                                                                                                                             
     Running `rustc --crate-name build_script_build /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/memchr-2.2.0/build.rs --color always --crate-type bin --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' --cfg 'feature="use_std"' -C metadata=2e508fcc9fcb9c8e -C extra-filename=-2e508fcc9fcb9c8e --out-dir /tmp/cargo-installWCrlbH/release/build/memchr-2e508fcc9fcb9c8e -L dependency=/tmp/cargo-installWCrlbH/release/deps --cap-lints allow`
   Compiling libc v0.2.51                                                                                                                              
     Running `rustc --crate-name build_script_build /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/build.rs --color always --crate-type bin --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' --cfg 'feature="use_std"' -C metadata=2fc61d8b507411a9 -C extra-filename=-2fc61d8b507411a9 --out-dir /tmp/cargo-installWCrlbH/release/build/libc-2fc61d8b507411a9 -L dependency=/tmp/cargo-installWCrlbH/release/deps --cap-lints allow`
   Compiling syn v0.15.30                                                                                                                              
     Running `rustc --crate-name build_script_build /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-0.15.30/build.rs --color always --crate-type bin --emit=dep-info,link -C opt-level=3 --cfg 'feature="clone-impls"' --cfg 'feature="default"' --cfg 'feature="derive"' --cfg 'feature="parsing"' --cfg 'feature="printing"' --cfg 'feature="proc-macro"' --cfg 'feature="proc-macro2"' --cfg 'feature="quote"' -C metadata=105c6bc62a486db1 -C extra-filename=-105c6bc62a486db1 --out-dir /tmp/cargo-installWCrlbH/release/build/syn-105c6bc62a486db1 -L dependency=/tmp/cargo-installWCrlbH/release/deps --cap-lints allow`
   Compiling ucd-trie v0.1.1                                                                                                                           
     Running `rustc --crate-name ucd_trie /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/ucd-trie-0.1.1/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' --cfg 'feature="std"' -C metadata=0a8930e81bcc380c -C extra-filename=-0a8930e81bcc380c --out-dir /tmp/cargo-installWCrlbH/release/deps -L dependency=/tmp/cargo-installWCrlbH/release/deps --cap-lints allow`
   Compiling maplit v1.0.1                                                                                                                             
     Running `rustc --crate-name maplit /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/maplit-1.0.1/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=a684fcefacdfafa4 -C extra-filename=-a684fcefacdfafa4 --out-dir /tmp/cargo-installWCrlbH/release/deps -L dependency=/tmp/cargo-installWCrlbH/release/deps --cap-lints allow`
   Compiling lazy_static v1.3.0                                                                                                                        
     Running `rustc --crate-name lazy_static /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/lazy_static-1.3.0/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=2af91ade475ddbea -C extra-filename=-2af91ade475ddbea --out-dir /tmp/cargo-installWCrlbH/release/deps -L dependency=/tmp/cargo-installWCrlbH/release/deps --cap-lints allow`
   Compiling regex v1.1.5                                                                                                                              
     Running `rustc --crate-name build_script_build /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/regex-1.1.5/build.rs --color always --crate-type bin --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' --cfg 'feature="use_std"' -C metadata=69a87108daf6f222 -C extra-filename=-69a87108daf6f222 --out-dir /tmp/cargo-installWCrlbH/release/build/regex-69a87108daf6f222 -L dependency=/tmp/cargo-installWCrlbH/release/deps --cap-lints allow`
   Compiling ucd-util v0.1.3                                                                                                                           
     Running `rustc --crate-name ucd_util /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/ucd-util-0.1.3/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=2b6cee58fbae93f3 -C extra-filename=-2b6cee58fbae93f3 --out-dir /tmp/cargo-installWCrlbH/release/deps -L dependency=/tmp/cargo-installWCrlbH/release/deps --cap-lints allow`
   Compiling unicode-width v0.1.5                                                                                                                      
     Running `rustc --crate-name unicode_width /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/unicode-width-0.1.5/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' -C metadata=7df78f120c55f0bb -C extra-filename=-7df78f120c55f0bb --out-dir /tmp/cargo-installWCrlbH/release/deps -L dependency=/tmp/cargo-installWCrlbH/release/deps --cap-lints allow`
   Compiling strsim v0.8.0                                                                                                                             
     Running `rustc --crate-name strsim /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/strsim-0.8.0/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=59c006ec0acf9452 -C extra-filename=-59c006ec0acf9452 --out-dir /tmp/cargo-installWCrlbH/release/deps -L dependency=/tmp/cargo-installWCrlbH/release/deps --cap-lints allow`
   Compiling vec_map v0.8.1                                                                                                                            
     Running `rustc --crate-name vec_map /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/vec_map-0.8.1/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=b7c280ce443eb023 -C extra-filename=-b7c280ce443eb023 --out-dir /tmp/cargo-installWCrlbH/release/deps -L dependency=/tmp/cargo-installWCrlbH/release/deps --cap-lints allow`
   Compiling bitflags v1.0.4                                                                                                                           
     Running `rustc --crate-name bitflags /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/bitflags-1.0.4/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' -C metadata=ad9a4cd6860446df -C extra-filename=-ad9a4cd6860446df --out-dir /tmp/cargo-installWCrlbH/release/deps -L dependency=/tmp/cargo-installWCrlbH/release/deps --cap-lints allow`
   Compiling utf8-ranges v1.0.2                                                                                                                        
     Running `rustc --crate-name utf8_ranges /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/utf8-ranges-1.0.2/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=bb77f0491ef1334f -C extra-filename=-bb77f0491ef1334f --out-dir /tmp/cargo-installWCrlbH/release/deps -L dependency=/tmp/cargo-installWCrlbH/release/deps --cap-lints allow`
   Compiling ansi_term v0.11.0                                                                                                                         
     Running `rustc --crate-name ansi_term /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/ansi_term-0.11.0/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=63e4b5a8d696310e -C extra-filename=-63e4b5a8d696310e --out-dir /tmp/cargo-installWCrlbH/release/deps -L dependency=/tmp/cargo-installWCrlbH/release/deps --cap-lints allow`
   Compiling entities v1.0.1                                                                                                                           
     Running `rustc --crate-name entities /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/entities-1.0.1/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=b41079d2b7f63e1a -C extra-filename=-b41079d2b7f63e1a --out-dir /tmp/cargo-installWCrlbH/release/deps -L dependency=/tmp/cargo-installWCrlbH/release/deps --cap-lints allow`
   Compiling typed-arena v1.4.1                                                                                                                        
     Running `rustc --crate-name typed_arena /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/typed-arena-1.4.1/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' --cfg 'feature="std"' -C metadata=79fb06894b14b115 -C extra-filename=-79fb06894b14b115 --out-dir /tmp/cargo-installWCrlbH/release/deps -L dependency=/tmp/cargo-installWCrlbH/release/deps --cap-lints allow`
   Compiling unicode_categories v0.1.1                                                                                                                 
     Running `rustc --crate-name unicode_categories /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/unicode_categories-0.1.1/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=769eb0b437b32a41 -C extra-filename=-769eb0b437b32a41 --out-dir /tmp/cargo-installWCrlbH/release/deps -L dependency=/tmp/cargo-installWCrlbH/release/deps --cap-lints allow`
     Running `/tmp/cargo-installWCrlbH/release/build/proc-macro2-495c354e6dc247ee/build-script-build`                                                  
     Running `/tmp/cargo-installWCrlbH/release/build/memchr-2e508fcc9fcb9c8e/build-script-build`                                                       
     Running `/tmp/cargo-installWCrlbH/release/build/libc-2fc61d8b507411a9/build-script-build`                                                         
     Running `/tmp/cargo-installWCrlbH/release/build/syn-105c6bc62a486db1/build-script-build`                                                          
   Compiling thread_local v0.3.6                                                                                                                       
     Running `rustc --crate-name thread_local /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/thread_local-0.3.6/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=d1b4db2b6473a0ca -C extra-filename=-d1b4db2b6473a0ca --out-dir /tmp/cargo-installWCrlbH/release/deps -L dependency=/tmp/cargo-installWCrlbH/release/deps --extern lazy_static=/tmp/cargo-installWCrlbH/release/deps/liblazy_static-2af91ade475ddbea.rlib --cap-lints allow`
   Compiling pest v2.1.0                                                                                                                               
     Running `rustc --crate-name pest /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/pest-2.1.0/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=1af1081016174dd9 -C extra-filename=-1af1081016174dd9 --out-dir /tmp/cargo-installWCrlbH/release/deps -L dependency=/tmp/cargo-installWCrlbH/release/deps --extern ucd_trie=/tmp/cargo-installWCrlbH/release/deps/libucd_trie-0a8930e81bcc380c.rlib --cap-lints allow`
   Compiling regex-syntax v0.6.6                                                                                                                       
     Running `rustc --crate-name regex_syntax /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/regex-syntax-0.6.6/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=a14773b79df04db2 -C extra-filename=-a14773b79df04db2 --out-dir /tmp/cargo-installWCrlbH/release/deps -L dependency=/tmp/cargo-installWCrlbH/release/deps --extern ucd_util=/tmp/cargo-installWCrlbH/release/deps/libucd_util-2b6cee58fbae93f3.rlib --cap-lints allow`
   Compiling textwrap v0.11.0                                                                                                                          
     Running `rustc --crate-name textwrap /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/textwrap-0.11.0/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=23e5657108be28e4 -C extra-filename=-23e5657108be28e4 --out-dir /tmp/cargo-installWCrlbH/release/deps -L dependency=/tmp/cargo-installWCrlbH/release/deps --extern unicode_width=/tmp/cargo-installWCrlbH/release/deps/libunicode_width-7df78f120c55f0bb.rlib --cap-lints allow`
     Running `/tmp/cargo-installWCrlbH/release/build/regex-69a87108daf6f222/build-script-build`                                                        
     Running `rustc --crate-name proc_macro2 /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.4.27/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' --cfg 'feature="proc-macro"' -C metadata=794e7ca0e6b37112 -C extra-filename=-794e7ca0e6b37112 --out-dir /tmp/cargo-installWCrlbH/release/deps -L dependency=/tmp/cargo-installWCrlbH/release/deps --extern unicode_xid=/tmp/cargo-installWCrlbH/release/deps/libunicode_xid-5fa0ac7939e7f58b.rlib --cap-lints allow --cfg u128 --cfg use_proc_macro --cfg wrap_proc_macro`
     Running `rustc --crate-name memchr /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/memchr-2.2.0/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' --cfg 'feature="use_std"' -C metadata=2d1b3fe3e2e1d5a8 -C extra-filename=-2d1b3fe3e2e1d5a8 --out-dir /tmp/cargo-installWCrlbH/release/deps -L dependency=/tmp/cargo-installWCrlbH/release/deps --cap-lints allow --cfg memchr_runtime_simd --cfg memchr_runtime_sse2 --cfg memchr_runtime_sse42 --cfg memchr_runtime_avx`
     Running `rustc --crate-name libc /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' --cfg 'feature="use_std"' -C metadata=2d528faf9bce9082 -C extra-filename=-2d528faf9bce9082 --out-dir /tmp/cargo-installWCrlbH/release/deps -L dependency=/tmp/cargo-installWCrlbH/release/deps --cap-lints allow --cfg libc_priv_mod_use --cfg libc_union --cfg libc_const_size_of --cfg libc_align --cfg libc_core_cvoid`
   Compiling pest_meta v2.1.0                                                                                                                          
     Running `rustc --crate-name pest_meta /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/pest_meta-2.1.0/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=39924b3d7be8326b -C extra-filename=-39924b3d7be8326b --out-dir /tmp/cargo-installWCrlbH/release/deps -L dependency=/tmp/cargo-installWCrlbH/release/deps --extern maplit=/tmp/cargo-installWCrlbH/release/deps/libmaplit-a684fcefacdfafa4.rlib --extern pest=/tmp/cargo-installWCrlbH/release/deps/libpest-1af1081016174dd9.rlib --cap-lints allow`
   Compiling quote v0.6.11                                                                                                                             
     Running `rustc --crate-name quote /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/quote-0.6.11/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' --cfg 'feature="proc-macro"' --cfg 'feature="proc-macro2"' -C metadata=5679acc1c47b5be4 -C extra-filename=-5679acc1c47b5be4 --out-dir /tmp/cargo-installWCrlbH/release/deps -L dependency=/tmp/cargo-installWCrlbH/release/deps --extern proc_macro2=/tmp/cargo-installWCrlbH/release/deps/libproc_macro2-794e7ca0e6b37112.rlib --cap-lints allow`
   Compiling aho-corasick v0.7.3                                                                                                                       
     Running `rustc --crate-name aho_corasick /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/aho-corasick-0.7.3/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' --cfg 'feature="memchr"' --cfg 'feature="std"' -C metadata=0b53d6479b2f16e8 -C extra-filename=-0b53d6479b2f16e8 --out-dir /tmp/cargo-installWCrlbH/release/deps -L dependency=/tmp/cargo-installWCrlbH/release/deps --extern memchr=/tmp/cargo-installWCrlbH/release/deps/libmemchr-2d1b3fe3e2e1d5a8.rlib --cap-lints allow`
   Compiling twoway v0.1.8                                                                                                                             
     Running `rustc --crate-name twoway /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/twoway-0.1.8/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' --cfg 'feature="memchr"' --cfg 'feature="use_std"' -C metadata=445ae107fc8ff1ce -C extra-filename=-445ae107fc8ff1ce --out-dir /tmp/cargo-installWCrlbH/release/deps -L dependency=/tmp/cargo-installWCrlbH/release/deps --extern memchr=/tmp/cargo-installWCrlbH/release/deps/libmemchr-2d1b3fe3e2e1d5a8.rlib --cap-lints allow`
   Compiling atty v0.2.11                                                                                                                              
     Running `rustc --crate-name atty /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/atty-0.2.11/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=bd2cd300897e4da9 -C extra-filename=-bd2cd300897e4da9 --out-dir /tmp/cargo-installWCrlbH/release/deps -L dependency=/tmp/cargo-installWCrlbH/release/deps --extern libc=/tmp/cargo-installWCrlbH/release/deps/liblibc-2d528faf9bce9082.rlib --cap-lints allow`
     Running `rustc --crate-name regex /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/regex-1.1.5/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' --cfg 'feature="use_std"' -C metadata=c8d2be83cc7ee0e8 -C extra-filename=-c8d2be83cc7ee0e8 --out-dir /tmp/cargo-installWCrlbH/release/deps -L dependency=/tmp/cargo-installWCrlbH/release/deps --extern aho_corasick=/tmp/cargo-installWCrlbH/release/deps/libaho_corasick-0b53d6479b2f16e8.rlib --extern memchr=/tmp/cargo-installWCrlbH/release/deps/libmemchr-2d1b3fe3e2e1d5a8.rlib --extern regex_syntax=/tmp/cargo-installWCrlbH/release/deps/libregex_syntax-a14773b79df04db2.rlib --extern thread_local=/tmp/cargo-installWCrlbH/release/deps/libthread_local-d1b4db2b6473a0ca.rlib --extern utf8_ranges=/tmp/cargo-installWCrlbH/release/deps/libutf8_ranges-bb77f0491ef1334f.rlib --cap-lints allow --cfg regex_runtime_teddy_ssse3 --cfg regex_runtime_teddy_avx2`
   Compiling clap v2.33.0                                                                                                                              
     Running `rustc --crate-name clap /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-2.33.0/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg 'feature="ansi_term"' --cfg 'feature="atty"' --cfg 'feature="color"' --cfg 'feature="default"' --cfg 'feature="strsim"' --cfg 'feature="suggestions"' --cfg 'feature="vec_map"' -C metadata=1677959eed09ed9b -C extra-filename=-1677959eed09ed9b --out-dir /tmp/cargo-installWCrlbH/release/deps -L dependency=/tmp/cargo-installWCrlbH/release/deps --extern ansi_term=/tmp/cargo-installWCrlbH/release/deps/libansi_term-63e4b5a8d696310e.rlib --extern atty=/tmp/cargo-installWCrlbH/release/deps/libatty-bd2cd300897e4da9.rlib --extern bitflags=/tmp/cargo-installWCrlbH/release/deps/libbitflags-ad9a4cd6860446df.rlib --extern strsim=/tmp/cargo-installWCrlbH/release/deps/libstrsim-59c006ec0acf9452.rlib --extern textwrap=/tmp/cargo-installWCrlbH/release/deps/libtextwrap-23e5657108be28e4.rlib --extern unicode_width=/tmp/cargo-installWCrlbH/release/deps/libunicode_width-7df78f120c55f0bb.rlib --extern vec_map=/tmp/cargo-installWCrlbH/release/deps/libvec_map-b7c280ce443eb023.rlib --cap-lints allow`
     Running `rustc --crate-name syn /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-0.15.30/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg 'feature="clone-impls"' --cfg 'feature="default"' --cfg 'feature="derive"' --cfg 'feature="parsing"' --cfg 'feature="printing"' --cfg 'feature="proc-macro"' --cfg 'feature="proc-macro2"' --cfg 'feature="quote"' -C metadata=5a5d7ba553291088 -C extra-filename=-5a5d7ba553291088 --out-dir /tmp/cargo-installWCrlbH/release/deps -L dependency=/tmp/cargo-installWCrlbH/release/deps --extern proc_macro2=/tmp/cargo-installWCrlbH/release/deps/libproc_macro2-794e7ca0e6b37112.rlib --extern quote=/tmp/cargo-installWCrlbH/release/deps/libquote-5679acc1c47b5be4.rlib --extern unicode_xid=/tmp/cargo-installWCrlbH/release/deps/libunicode_xid-5fa0ac7939e7f58b.rlib --cap-lints allow --cfg syn_can_use_thread_id --cfg syn_can_call_macro_by_path --cfg syn_disable_nightly_tests`
   Compiling pest_generator v2.1.0                                                                                                                     
     Running `rustc --crate-name pest_generator /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/pest_generator-2.1.0/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=16ba334e3366017b -C extra-filename=-16ba334e3366017b --out-dir /tmp/cargo-installWCrlbH/release/deps -L dependency=/tmp/cargo-installWCrlbH/release/deps --extern pest=/tmp/cargo-installWCrlbH/release/deps/libpest-1af1081016174dd9.rlib --extern pest_meta=/tmp/cargo-installWCrlbH/release/deps/libpest_meta-39924b3d7be8326b.rlib --extern proc_macro2=/tmp/cargo-installWCrlbH/release/deps/libproc_macro2-794e7ca0e6b37112.rlib --extern quote=/tmp/cargo-installWCrlbH/release/deps/libquote-5679acc1c47b5be4.rlib --extern syn=/tmp/cargo-installWCrlbH/release/deps/libsyn-5a5d7ba553291088.rlib --cap-lints allow`
   Compiling pest_derive v2.1.0                                                                                                                        
     Running `rustc --crate-name pest_derive /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/pest_derive-2.1.0/src/lib.rs --color always --crate-type proc-macro --emit=dep-info,link -C prefer-dynamic -C opt-level=3 -C metadata=9d1e413f5b3f6f9e -C extra-filename=-9d1e413f5b3f6f9e --out-dir /tmp/cargo-installWCrlbH/release/deps -L dependency=/tmp/cargo-installWCrlbH/release/deps --extern pest=/tmp/cargo-installWCrlbH/release/deps/libpest-1af1081016174dd9.rlib --extern pest_generator=/tmp/cargo-installWCrlbH/release/deps/libpest_generator-16ba334e3366017b.rlib --cap-lints allow`
   Compiling comrak v0.4.1                                                                                                                             
     Running `rustc --crate-name comrak /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/comrak-0.4.1/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg 'feature="clap"' --cfg 'feature="default"' -C metadata=ec076ac8ea28c990 -C extra-filename=-ec076ac8ea28c990 --out-dir /tmp/cargo-installWCrlbH/release/deps -L dependency=/tmp/cargo-installWCrlbH/release/deps --extern clap=/tmp/cargo-installWCrlbH/release/deps/libclap-1677959eed09ed9b.rlib --extern entities=/tmp/cargo-installWCrlbH/release/deps/libentities-b41079d2b7f63e1a.rlib --extern lazy_static=/tmp/cargo-installWCrlbH/release/deps/liblazy_static-2af91ade475ddbea.rlib --extern pest=/tmp/cargo-installWCrlbH/release/deps/libpest-1af1081016174dd9.rlib --extern pest_derive=/tmp/cargo-installWCrlbH/release/deps/libpest_derive-9d1e413f5b3f6f9e.so --extern regex=/tmp/cargo-installWCrlbH/release/deps/libregex-c8d2be83cc7ee0e8.rlib --extern twoway=/tmp/cargo-installWCrlbH/release/deps/libtwoway-445ae107fc8ff1ce.rlib --extern typed_arena=/tmp/cargo-installWCrlbH/release/deps/libtyped_arena-79fb06894b14b115.rlib --extern unicode_categories=/tmp/cargo-installWCrlbH/release/deps/libunicode_categories-769eb0b437b32a41.rlib --cap-lints allow`
error[E0658]: `Self` struct constructors are unstable (see issue #51994)                                                                               
  --> /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/comrak-0.4.1/src/html.rs:73:9                                                      
   |                                                                                                                                                   
73 |         Self(HashSet::new())                                                                                                                      
   |         ^^^^                                                                                                                                      
                                                                                                                                                       
error: aborting due to previous error                                                                                                                  
                                                                                                                                                       
For more information about this error, try `rustc --explain E0658`.                                                                                    
error: failed to compile `comrak v0.4.1`, intermediate artifacts can be found at `/tmp/cargo-installWCrlbH`                                            

Caused by:
  Could not compile `comrak`.

Caused by:
  process didn't exit successfully: `rustc --crate-name comrak /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/comrak-0.4.1/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg 'feature="clap"' --cfg 'feature="default"' -C metadata=ec076ac8ea28c990 -C extra-filename=-ec076ac8ea28c990 --out-dir /tmp/cargo-installWCrlbH/release/deps -L dependency=/tmp/cargo-installWCrlbH/release/deps --extern clap=/tmp/cargo-installWCrlbH/release/deps/libclap-1677959eed09ed9b.rlib --extern entities=/tmp/cargo-installWCrlbH/release/deps/libentities-b41079d2b7f63e1a.rlib --extern lazy_static=/tmp/cargo-installWCrlbH/release/deps/liblazy_static-2af91ade475ddbea.rlib --extern pest=/tmp/cargo-installWCrlbH/release/deps/libpest-1af1081016174dd9.rlib --extern pest_derive=/tmp/cargo-installWCrlbH/release/deps/libpest_derive-9d1e413f5b3f6f9e.so --extern regex=/tmp/cargo-installWCrlbH/release/deps/libregex-c8d2be83cc7ee0e8.rlib --extern twoway=/tmp/cargo-installWCrlbH/release/deps/libtwoway-445ae107fc8ff1ce.rlib --extern typed_arena=/tmp/cargo-installWCrlbH/release/deps/libtyped_arena-79fb06894b14b115.rlib --extern unicode_categories=/tmp/cargo-installWCrlbH/release/deps/libunicode_categories-769eb0b437b32a41.rlib --cap-lints allow` (exit code: 1)

Detailed output from attempting to install v0.5.0 is below:

$ cargo install comrak --force --verbose --version 0.5.0
    Updating crates.io index
  Installing comrak v0.5.0                                                                                                                             
   Compiling proc-macro2 v0.4.27                                                                                                                       
     Running `rustc --crate-name build_script_build /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.4.27/build.rs --color always --crate-type bin --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' --cfg 'feature="proc-macro"' -C metadata=495c354e6dc247ee -C extra-filename=-495c354e6dc247ee --out-dir /tmp/cargo-installnrFCmC/release/build/proc-macro2-495c354e6dc247ee -L dependency=/tmp/cargo-installnrFCmC/release/deps --cap-lints allow`
   Compiling unicode-xid v0.1.0                                                                                                                        
     Running `rustc --crate-name unicode_xid /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/unicode-xid-0.1.0/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' -C metadata=5fa0ac7939e7f58b -C extra-filename=-5fa0ac7939e7f58b --out-dir /tmp/cargo-installnrFCmC/release/deps -L dependency=/tmp/cargo-installnrFCmC/release/deps --cap-lints allow`
   Compiling syn v0.15.30                                                                                                                              
     Running `rustc --crate-name build_script_build /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-0.15.30/build.rs --color always --crate-type bin --emit=dep-info,link -C opt-level=3 --cfg 'feature="clone-impls"' --cfg 'feature="default"' --cfg 'feature="derive"' --cfg 'feature="parsing"' --cfg 'feature="printing"' --cfg 'feature="proc-macro"' --cfg 'feature="proc-macro2"' --cfg 'feature="quote"' -C metadata=105c6bc62a486db1 -C extra-filename=-105c6bc62a486db1 --out-dir /tmp/cargo-installnrFCmC/release/build/syn-105c6bc62a486db1 -L dependency=/tmp/cargo-installnrFCmC/release/deps --cap-lints allow`
   Compiling memchr v2.2.0                                                                                                                             
     Running `rustc --crate-name build_script_build /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/memchr-2.2.0/build.rs --color always --crate-type bin --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' --cfg 'feature="use_std"' -C metadata=2e508fcc9fcb9c8e -C extra-filename=-2e508fcc9fcb9c8e --out-dir /tmp/cargo-installnrFCmC/release/build/memchr-2e508fcc9fcb9c8e -L dependency=/tmp/cargo-installnrFCmC/release/deps --cap-lints allow`
   Compiling ucd-trie v0.1.1                                                                                                                           
     Running `rustc --crate-name ucd_trie /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/ucd-trie-0.1.1/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' --cfg 'feature="std"' -C metadata=0a8930e81bcc380c -C extra-filename=-0a8930e81bcc380c --out-dir /tmp/cargo-installnrFCmC/release/deps -L dependency=/tmp/cargo-installnrFCmC/release/deps --cap-lints allow`
   Compiling libc v0.2.51                                                                                                                              
     Running `rustc --crate-name build_script_build /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/build.rs --color always --crate-type bin --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' --cfg 'feature="use_std"' -C metadata=2fc61d8b507411a9 -C extra-filename=-2fc61d8b507411a9 --out-dir /tmp/cargo-installnrFCmC/release/build/libc-2fc61d8b507411a9 -L dependency=/tmp/cargo-installnrFCmC/release/deps --cap-lints allow`
   Compiling maplit v1.0.1                                                                                                                             
     Running `rustc --crate-name maplit /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/maplit-1.0.1/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=a684fcefacdfafa4 -C extra-filename=-a684fcefacdfafa4 --out-dir /tmp/cargo-installnrFCmC/release/deps -L dependency=/tmp/cargo-installnrFCmC/release/deps --cap-lints allow`
   Compiling unicode-width v0.1.5                                                                                                                      
     Running `rustc --crate-name unicode_width /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/unicode-width-0.1.5/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' -C metadata=7df78f120c55f0bb -C extra-filename=-7df78f120c55f0bb --out-dir /tmp/cargo-installnrFCmC/release/deps -L dependency=/tmp/cargo-installnrFCmC/release/deps --cap-lints allow`
   Compiling ucd-util v0.1.3                                                                                                                           
     Running `rustc --crate-name ucd_util /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/ucd-util-0.1.3/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=2b6cee58fbae93f3 -C extra-filename=-2b6cee58fbae93f3 --out-dir /tmp/cargo-installnrFCmC/release/deps -L dependency=/tmp/cargo-installnrFCmC/release/deps --cap-lints allow`
   Compiling lazy_static v1.3.0                                                                                                                        
     Running `rustc --crate-name lazy_static /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/lazy_static-1.3.0/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=2af91ade475ddbea -C extra-filename=-2af91ade475ddbea --out-dir /tmp/cargo-installnrFCmC/release/deps -L dependency=/tmp/cargo-installnrFCmC/release/deps --cap-lints allow`
   Compiling regex v1.1.5                                                                                                                              
     Running `rustc --crate-name build_script_build /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/regex-1.1.5/build.rs --color always --crate-type bin --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' --cfg 'feature="use_std"' -C metadata=69a87108daf6f222 -C extra-filename=-69a87108daf6f222 --out-dir /tmp/cargo-installnrFCmC/release/build/regex-69a87108daf6f222 -L dependency=/tmp/cargo-installnrFCmC/release/deps --cap-lints allow`
   Compiling bitflags v1.0.4                                                                                                                           
     Running `rustc --crate-name bitflags /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/bitflags-1.0.4/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' -C metadata=ad9a4cd6860446df -C extra-filename=-ad9a4cd6860446df --out-dir /tmp/cargo-installnrFCmC/release/deps -L dependency=/tmp/cargo-installnrFCmC/release/deps --cap-lints allow`
   Compiling strsim v0.8.0                                                                                                                             
     Running `rustc --crate-name strsim /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/strsim-0.8.0/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=59c006ec0acf9452 -C extra-filename=-59c006ec0acf9452 --out-dir /tmp/cargo-installnrFCmC/release/deps -L dependency=/tmp/cargo-installnrFCmC/release/deps --cap-lints allow`
   Compiling vec_map v0.8.1                                                                                                                            
     Running `rustc --crate-name vec_map /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/vec_map-0.8.1/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=b7c280ce443eb023 -C extra-filename=-b7c280ce443eb023 --out-dir /tmp/cargo-installnrFCmC/release/deps -L dependency=/tmp/cargo-installnrFCmC/release/deps --cap-lints allow`
   Compiling utf8-ranges v1.0.2                                                                                                                        
     Running `rustc --crate-name utf8_ranges /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/utf8-ranges-1.0.2/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=bb77f0491ef1334f -C extra-filename=-bb77f0491ef1334f --out-dir /tmp/cargo-installnrFCmC/release/deps -L dependency=/tmp/cargo-installnrFCmC/release/deps --cap-lints allow`
   Compiling ansi_term v0.11.0                                                                                                                         
     Running `rustc --crate-name ansi_term /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/ansi_term-0.11.0/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=63e4b5a8d696310e -C extra-filename=-63e4b5a8d696310e --out-dir /tmp/cargo-installnrFCmC/release/deps -L dependency=/tmp/cargo-installnrFCmC/release/deps --cap-lints allow`
   Compiling unicode_categories v0.1.1                                                                                                                 
     Running `rustc --crate-name unicode_categories /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/unicode_categories-0.1.1/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=769eb0b437b32a41 -C extra-filename=-769eb0b437b32a41 --out-dir /tmp/cargo-installnrFCmC/release/deps -L dependency=/tmp/cargo-installnrFCmC/release/deps --cap-lints allow`
   Compiling typed-arena v1.4.1                                                                                                                        
     Running `rustc --crate-name typed_arena /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/typed-arena-1.4.1/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' --cfg 'feature="std"' -C metadata=79fb06894b14b115 -C extra-filename=-79fb06894b14b115 --out-dir /tmp/cargo-installnrFCmC/release/deps -L dependency=/tmp/cargo-installnrFCmC/release/deps --cap-lints allow`
   Compiling entities v1.0.1                                                                                                                           
     Running `rustc --crate-name entities /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/entities-1.0.1/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=b41079d2b7f63e1a -C extra-filename=-b41079d2b7f63e1a --out-dir /tmp/cargo-installnrFCmC/release/deps -L dependency=/tmp/cargo-installnrFCmC/release/deps --cap-lints allow`
     Running `/tmp/cargo-installnrFCmC/release/build/proc-macro2-495c354e6dc247ee/build-script-build`                                                  
     Running `/tmp/cargo-installnrFCmC/release/build/syn-105c6bc62a486db1/build-script-build`                                                          
     Running `/tmp/cargo-installnrFCmC/release/build/memchr-2e508fcc9fcb9c8e/build-script-build`                                                       
   Compiling pest v2.1.0                                                                                                                               
     Running `rustc --crate-name pest /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/pest-2.1.0/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=1af1081016174dd9 -C extra-filename=-1af1081016174dd9 --out-dir /tmp/cargo-installnrFCmC/release/deps -L dependency=/tmp/cargo-installnrFCmC/release/deps --extern ucd_trie=/tmp/cargo-installnrFCmC/release/deps/libucd_trie-0a8930e81bcc380c.rlib --cap-lints allow`
   Compiling textwrap v0.11.0                                                                                                                          
     Running `rustc --crate-name textwrap /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/textwrap-0.11.0/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=23e5657108be28e4 -C extra-filename=-23e5657108be28e4 --out-dir /tmp/cargo-installnrFCmC/release/deps -L dependency=/tmp/cargo-installnrFCmC/release/deps --extern unicode_width=/tmp/cargo-installnrFCmC/release/deps/libunicode_width-7df78f120c55f0bb.rlib --cap-lints allow`
   Compiling regex-syntax v0.6.6                                                                                                                       
     Running `rustc --crate-name regex_syntax /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/regex-syntax-0.6.6/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=a14773b79df04db2 -C extra-filename=-a14773b79df04db2 --out-dir /tmp/cargo-installnrFCmC/release/deps -L dependency=/tmp/cargo-installnrFCmC/release/deps --extern ucd_util=/tmp/cargo-installnrFCmC/release/deps/libucd_util-2b6cee58fbae93f3.rlib --cap-lints allow`
   Compiling thread_local v0.3.6                                                                                                                       
     Running `rustc --crate-name thread_local /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/thread_local-0.3.6/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=d1b4db2b6473a0ca -C extra-filename=-d1b4db2b6473a0ca --out-dir /tmp/cargo-installnrFCmC/release/deps -L dependency=/tmp/cargo-installnrFCmC/release/deps --extern lazy_static=/tmp/cargo-installnrFCmC/release/deps/liblazy_static-2af91ade475ddbea.rlib --cap-lints allow`
     Running `/tmp/cargo-installnrFCmC/release/build/libc-2fc61d8b507411a9/build-script-build`                                                         
     Running `/tmp/cargo-installnrFCmC/release/build/regex-69a87108daf6f222/build-script-build`                                                        
     Running `rustc --crate-name proc_macro2 /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.4.27/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' --cfg 'feature="proc-macro"' -C metadata=794e7ca0e6b37112 -C extra-filename=-794e7ca0e6b37112 --out-dir /tmp/cargo-installnrFCmC/release/deps -L dependency=/tmp/cargo-installnrFCmC/release/deps --extern unicode_xid=/tmp/cargo-installnrFCmC/release/deps/libunicode_xid-5fa0ac7939e7f58b.rlib --cap-lints allow --cfg u128 --cfg use_proc_macro --cfg wrap_proc_macro`
     Running `rustc --crate-name memchr /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/memchr-2.2.0/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' --cfg 'feature="use_std"' -C metadata=2d1b3fe3e2e1d5a8 -C extra-filename=-2d1b3fe3e2e1d5a8 --out-dir /tmp/cargo-installnrFCmC/release/deps -L dependency=/tmp/cargo-installnrFCmC/release/deps --cap-lints allow --cfg memchr_runtime_simd --cfg memchr_runtime_sse2 --cfg memchr_runtime_sse42 --cfg memchr_runtime_avx`
   Compiling pest_meta v2.1.0                                                                                                                          
     Running `rustc --crate-name pest_meta /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/pest_meta-2.1.0/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=39924b3d7be8326b -C extra-filename=-39924b3d7be8326b --out-dir /tmp/cargo-installnrFCmC/release/deps -L dependency=/tmp/cargo-installnrFCmC/release/deps --extern maplit=/tmp/cargo-installnrFCmC/release/deps/libmaplit-a684fcefacdfafa4.rlib --extern pest=/tmp/cargo-installnrFCmC/release/deps/libpest-1af1081016174dd9.rlib --cap-lints allow`
     Running `rustc --crate-name libc /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.51/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' --cfg 'feature="use_std"' -C metadata=2d528faf9bce9082 -C extra-filename=-2d528faf9bce9082 --out-dir /tmp/cargo-installnrFCmC/release/deps -L dependency=/tmp/cargo-installnrFCmC/release/deps --cap-lints allow --cfg libc_priv_mod_use --cfg libc_union --cfg libc_const_size_of --cfg libc_align --cfg libc_core_cvoid`
   Compiling quote v0.6.11                                                                                                                             
     Running `rustc --crate-name quote /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/quote-0.6.11/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' --cfg 'feature="proc-macro"' --cfg 'feature="proc-macro2"' -C metadata=5679acc1c47b5be4 -C extra-filename=-5679acc1c47b5be4 --out-dir /tmp/cargo-installnrFCmC/release/deps -L dependency=/tmp/cargo-installnrFCmC/release/deps --extern proc_macro2=/tmp/cargo-installnrFCmC/release/deps/libproc_macro2-794e7ca0e6b37112.rlib --cap-lints allow`
   Compiling aho-corasick v0.7.3                                                                                                                       
     Running `rustc --crate-name aho_corasick /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/aho-corasick-0.7.3/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' --cfg 'feature="memchr"' --cfg 'feature="std"' -C metadata=0b53d6479b2f16e8 -C extra-filename=-0b53d6479b2f16e8 --out-dir /tmp/cargo-installnrFCmC/release/deps -L dependency=/tmp/cargo-installnrFCmC/release/deps --extern memchr=/tmp/cargo-installnrFCmC/release/deps/libmemchr-2d1b3fe3e2e1d5a8.rlib --cap-lints allow`
   Compiling twoway v0.1.8                                                                                                                             
     Running `rustc --crate-name twoway /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/twoway-0.1.8/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' --cfg 'feature="memchr"' --cfg 'feature="use_std"' -C metadata=445ae107fc8ff1ce -C extra-filename=-445ae107fc8ff1ce --out-dir /tmp/cargo-installnrFCmC/release/deps -L dependency=/tmp/cargo-installnrFCmC/release/deps --extern memchr=/tmp/cargo-installnrFCmC/release/deps/libmemchr-2d1b3fe3e2e1d5a8.rlib --cap-lints allow`
   Compiling atty v0.2.11                                                                                                                              
     Running `rustc --crate-name atty /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/atty-0.2.11/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=bd2cd300897e4da9 -C extra-filename=-bd2cd300897e4da9 --out-dir /tmp/cargo-installnrFCmC/release/deps -L dependency=/tmp/cargo-installnrFCmC/release/deps --extern libc=/tmp/cargo-installnrFCmC/release/deps/liblibc-2d528faf9bce9082.rlib --cap-lints allow`
     Running `rustc --crate-name syn /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-0.15.30/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg 'feature="clone-impls"' --cfg 'feature="default"' --cfg 'feature="derive"' --cfg 'feature="parsing"' --cfg 'feature="printing"' --cfg 'feature="proc-macro"' --cfg 'feature="proc-macro2"' --cfg 'feature="quote"' -C metadata=5a5d7ba553291088 -C extra-filename=-5a5d7ba553291088 --out-dir /tmp/cargo-installnrFCmC/release/deps -L dependency=/tmp/cargo-installnrFCmC/release/deps --extern proc_macro2=/tmp/cargo-installnrFCmC/release/deps/libproc_macro2-794e7ca0e6b37112.rlib --extern quote=/tmp/cargo-installnrFCmC/release/deps/libquote-5679acc1c47b5be4.rlib --extern unicode_xid=/tmp/cargo-installnrFCmC/release/deps/libunicode_xid-5fa0ac7939e7f58b.rlib --cap-lints allow --cfg syn_can_use_thread_id --cfg syn_can_call_macro_by_path --cfg syn_disable_nightly_tests`
     Running `rustc --crate-name regex /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/regex-1.1.5/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' --cfg 'feature="use_std"' -C metadata=c8d2be83cc7ee0e8 -C extra-filename=-c8d2be83cc7ee0e8 --out-dir /tmp/cargo-installnrFCmC/release/deps -L dependency=/tmp/cargo-installnrFCmC/release/deps --extern aho_corasick=/tmp/cargo-installnrFCmC/release/deps/libaho_corasick-0b53d6479b2f16e8.rlib --extern memchr=/tmp/cargo-installnrFCmC/release/deps/libmemchr-2d1b3fe3e2e1d5a8.rlib --extern regex_syntax=/tmp/cargo-installnrFCmC/release/deps/libregex_syntax-a14773b79df04db2.rlib --extern thread_local=/tmp/cargo-installnrFCmC/release/deps/libthread_local-d1b4db2b6473a0ca.rlib --extern utf8_ranges=/tmp/cargo-installnrFCmC/release/deps/libutf8_ranges-bb77f0491ef1334f.rlib --cap-lints allow --cfg regex_runtime_teddy_ssse3 --cfg regex_runtime_teddy_avx2`
   Compiling clap v2.33.0                                                                                                                              
     Running `rustc --crate-name clap /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-2.33.0/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg 'feature="ansi_term"' --cfg 'feature="atty"' --cfg 'feature="color"' --cfg 'feature="default"' --cfg 'feature="strsim"' --cfg 'feature="suggestions"' --cfg 'feature="vec_map"' -C metadata=1677959eed09ed9b -C extra-filename=-1677959eed09ed9b --out-dir /tmp/cargo-installnrFCmC/release/deps -L dependency=/tmp/cargo-installnrFCmC/release/deps --extern ansi_term=/tmp/cargo-installnrFCmC/release/deps/libansi_term-63e4b5a8d696310e.rlib --extern atty=/tmp/cargo-installnrFCmC/release/deps/libatty-bd2cd300897e4da9.rlib --extern bitflags=/tmp/cargo-installnrFCmC/release/deps/libbitflags-ad9a4cd6860446df.rlib --extern strsim=/tmp/cargo-installnrFCmC/release/deps/libstrsim-59c006ec0acf9452.rlib --extern textwrap=/tmp/cargo-installnrFCmC/release/deps/libtextwrap-23e5657108be28e4.rlib --extern unicode_width=/tmp/cargo-installnrFCmC/release/deps/libunicode_width-7df78f120c55f0bb.rlib --extern vec_map=/tmp/cargo-installnrFCmC/release/deps/libvec_map-b7c280ce443eb023.rlib --cap-lints allow`
   Compiling pest_generator v2.1.0                                                                                                                     
     Running `rustc --crate-name pest_generator /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/pest_generator-2.1.0/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=16ba334e3366017b -C extra-filename=-16ba334e3366017b --out-dir /tmp/cargo-installnrFCmC/release/deps -L dependency=/tmp/cargo-installnrFCmC/release/deps --extern pest=/tmp/cargo-installnrFCmC/release/deps/libpest-1af1081016174dd9.rlib --extern pest_meta=/tmp/cargo-installnrFCmC/release/deps/libpest_meta-39924b3d7be8326b.rlib --extern proc_macro2=/tmp/cargo-installnrFCmC/release/deps/libproc_macro2-794e7ca0e6b37112.rlib --extern quote=/tmp/cargo-installnrFCmC/release/deps/libquote-5679acc1c47b5be4.rlib --extern syn=/tmp/cargo-installnrFCmC/release/deps/libsyn-5a5d7ba553291088.rlib --cap-lints allow`
   Compiling pest_derive v2.1.0                                                                                                                        
     Running `rustc --crate-name pest_derive /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/pest_derive-2.1.0/src/lib.rs --color always --crate-type proc-macro --emit=dep-info,link -C prefer-dynamic -C opt-level=3 -C metadata=9d1e413f5b3f6f9e -C extra-filename=-9d1e413f5b3f6f9e --out-dir /tmp/cargo-installnrFCmC/release/deps -L dependency=/tmp/cargo-installnrFCmC/release/deps --extern pest=/tmp/cargo-installnrFCmC/release/deps/libpest-1af1081016174dd9.rlib --extern pest_generator=/tmp/cargo-installnrFCmC/release/deps/libpest_generator-16ba334e3366017b.rlib --cap-lints allow`
   Compiling comrak v0.5.0                                                                                                                             
     Running `rustc --crate-name comrak /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/comrak-0.5.0/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg 'feature="clap"' --cfg 'feature="default"' -C metadata=0dc11868b60c7c8d -C extra-filename=-0dc11868b60c7c8d --out-dir /tmp/cargo-installnrFCmC/release/deps -L dependency=/tmp/cargo-installnrFCmC/release/deps --extern clap=/tmp/cargo-installnrFCmC/release/deps/libclap-1677959eed09ed9b.rlib --extern entities=/tmp/cargo-installnrFCmC/release/deps/libentities-b41079d2b7f63e1a.rlib --extern lazy_static=/tmp/cargo-installnrFCmC/release/deps/liblazy_static-2af91ade475ddbea.rlib --extern pest=/tmp/cargo-installnrFCmC/release/deps/libpest-1af1081016174dd9.rlib --extern pest_derive=/tmp/cargo-installnrFCmC/release/deps/libpest_derive-9d1e413f5b3f6f9e.so --extern regex=/tmp/cargo-installnrFCmC/release/deps/libregex-c8d2be83cc7ee0e8.rlib --extern twoway=/tmp/cargo-installnrFCmC/release/deps/libtwoway-445ae107fc8ff1ce.rlib --extern typed_arena=/tmp/cargo-installnrFCmC/release/deps/libtyped_arena-79fb06894b14b115.rlib --extern unicode_categories=/tmp/cargo-installnrFCmC/release/deps/libunicode_categories-769eb0b437b32a41.rlib --cap-lints allow`
error[E0658]: `Self` struct constructors are unstable (see issue #51994)                                                                               
  --> /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/comrak-0.5.0/src/html.rs:73:9                                                      
   |                                                                                                                                                   
73 |         Self(HashSet::new())                                                                                                                      
   |         ^^^^                                                                                                                                      
                                                                                                                                                       
error: aborting due to previous error                                                                                                                  
                                                                                                                                                       
For more information about this error, try `rustc --explain E0658`.                                                                                    
error: failed to compile `comrak v0.5.0`, intermediate artifacts can be found at `/tmp/cargo-installnrFCmC`                                            

Caused by:
  Could not compile `comrak`.

Caused by:
  process didn't exit successfully: `rustc --crate-name comrak /home/chronos/.cargo/registry/src/github.com-1ecc6299db9ec823/comrak-0.5.0/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg 'feature="clap"' --cfg 'feature="default"' -C metadata=0dc11868b60c7c8d -C extra-filename=-0dc11868b60c7c8d --out-dir /tmp/cargo-installnrFCmC/release/deps -L dependency=/tmp/cargo-installnrFCmC/release/deps --extern clap=/tmp/cargo-installnrFCmC/release/deps/libclap-1677959eed09ed9b.rlib --extern entities=/tmp/cargo-installnrFCmC/release/deps/libentities-b41079d2b7f63e1a.rlib --extern lazy_static=/tmp/cargo-installnrFCmC/release/deps/liblazy_static-2af91ade475ddbea.rlib --extern pest=/tmp/cargo-installnrFCmC/release/deps/libpest-1af1081016174dd9.rlib --extern pest_derive=/tmp/cargo-installnrFCmC/release/deps/libpest_derive-9d1e413f5b3f6f9e.so --extern regex=/tmp/cargo-installnrFCmC/release/deps/libregex-c8d2be83cc7ee0e8.rlib --extern twoway=/tmp/cargo-installnrFCmC/release/deps/libtwoway-445ae107fc8ff1ce.rlib --extern typed_arena=/tmp/cargo-installnrFCmC/release/deps/libtyped_arena-79fb06894b14b115.rlib --extern unicode_categories=/tmp/cargo-installnrFCmC/release/deps/libunicode_categories-769eb0b437b32a41.rlib --cap-lints allow` (exit code: 1)

I am using the following versions on Alpine Linux edge:

localhost:~$ cargo --version
cargo 1.31.0
localhost:~$ rustc --version
rustc 1.31.1

Quadratic blowup on pathological input.

This takes ~1s on my machine:

perl -e 'print "_a* " x 40000' | time comrak >/dev/null

This allows a denial of service in any application using Comrak to process untrusted input, and thus prevents it from being used for that purpose, forcing the use of a C library such as cmark or MD4C instead.

Header ID generation only removes first rejected character

When Header IDs are being generated, Regex's replace is being called rather than replace_all. Unlike String's replace, Regex's only replaces the first match. As such, "Isn't it grand?" will have "isnt-it-grand?" generated as a Header ID rather than "isnt-it-grand" (without the trailing question mark).

This has the obvious trivial fix, which I'll submit as a PR shortly.

Deprecation of arena_tree

I'm not sure if this is a real issue, but arena_tree is no longer maintained by word from the author here. He has said that he would be willing to give it over to a maintainer if someone would step up, but I doubt that's happening anytime soon.

So I wanted to ask, will this cause problems at some point in the future? Arena Tree is fairly small and doesn't seem to have many complex issues that could arise, but I still worry that at some point without a maintainer or anyone in charge of it that it will stop working with upcoming changes to the rust language. Thoughts?

Description List as an extension

There is an open thread about description lists in talk.commonmark.org. Since comrak has support for some extensions, I think that it would be nice to add support for definition lists.

Syntax

There is no official syntax for definition list, but it is implemented in many Markdown processors. One of the comments includes a list of lins to the documentation of some of those processors.

The most common syntax is using colon at the beginning of the definition.

term1

: definition1

term2

: definition2

This syntax is used in Pandoc, PHP Markdown, fletcher/MultiMarkdown-4, Python Markdown, kramdown, etc.

Arena-tree 0.3.0 is yanked, and now I can't compile comrak.

Updating registry `https://github.com/rust-lang/crates.io-index`
error: no matching package named `arena-tree` found (required by `comrak`)
location searched: registry https://github.com/rust-lang/crates.io-index
version required: ^0.3.0

Checking arena-tree in crates.io and found out that all versions are yanked.
Now, cargo should STILL be able to download it, however this is not the case.

arena-tree has been yanked since May 24, 2015, but I don't get why comrak still able to compile it in travis-ci

error[E0432]: unresolved import `comrak::format_html`
  --> src/lib.rs:11:30
   |
11 | use comrak::{parse_document, format_html, ComrakOptions};
   |                              ^^^^^^^^^^^ no `format_html` in the root

error[E0432]: unresolved import `comrak::nodes::AstNode`
  --> src/lib.rs:12:21
   |
12 | use comrak::nodes::{AstNode, NodeValue, NodeHtmlBlock};
   |                     ^^^^^^^ Could not find `nodes` in `comrak`

error[E0432]: unresolved import `comrak::nodes::NodeValue`
  --> src/lib.rs:12:30
   |
12 | use comrak::nodes::{AstNode, NodeValue, NodeHtmlBlock};
   |                              ^^^^^^^^^ Could not find `nodes` in `comrak`

error[E0432]: unresolved import `comrak::nodes::NodeHtmlBlock`
  --> src/lib.rs:12:41
   |
12 | use comrak::nodes::{AstNode, NodeValue, NodeHtmlBlock};
   |                                         ^^^^^^^^^^^^^ Could not find `nodes` in `comrak`

error[E0560]: struct `comrak::ComrakOptions` has no field named `ext_tasklist`
  --> src/lib.rs:97:9
   |
97 |         ext_tasklist: true,
   |         ^^^^^^^^^^^^^ `comrak::ComrakOptions` does not have this field

error[E0560]: struct `comrak::ComrakOptions` has no field named `ext_superscript`
  --> src/lib.rs:98:9
   |
98 |         ext_superscript: false,
   |         ^^^^^^^^^^^^^^^^ `comrak::ComrakOptions` does not have this field

error: aborting due to 6 previous errors

error: Could not compile `spongedown`.

To learn more, run the command again with --verbose.

I was able to keep building my code since yesterday, something might be a bit off in my machine. But I don't know what.

Mathematics

A commonly requested feature is the ability to input mathematics using LaTeX syntax without the markdown parser getting confused and messing it all up. All the parser needs to do is leave the maths alone, without interpreting underscores/askerisks/escapes, and rendering can then be delegated to something like MathJax or KaTeX. It would certainly be a nice feature for scientists, or people needing to describe algorithms etc.

A while ago I made a summary table of all the ways this syntax extension has been implemented in other markdown software, available here: https://github.com/cben/mathdown/wiki/Math-in-MarkDown#appendix-summary-table. I'd say probably the right answer is to do what pandoc does, and have $ ... $ to delimit inline formulae, and $$ ... $$ for display-mode.

Inconsistent conversion of `A***B*C*`

While fuzz testing my application, I found a case where I converting a markdown string to an AST, then write the AST back to markdown,
then read the result back to an AST again, and the first and second ASTs do not match.

While I don't expect this to be perfectly reversible in all cases, this case seems especially odd:

The initial string is

A***B*C*

which becomes the AST

<text value="A*"/>
<emph>
     <emph>
          <text value="B"/>
      </emph>
      <text value="C"/>
</emph>

which is then re-rendered as markdown as:

A\***B*C*

which is then parsed as the AST

<text value="A***B"/>
<emph>
    <text value="C"/>
</emph>

Generation of Header ID's

I suspect I may already know the answer to this question, however as I'm not really that familiar with the different markdown specs so thought I would reach out anyway.

Github automatically creates header id's, for example (id="user-content-about")

## About

// Renders

<h2>
  <a href="#about" aria-hidden="true" class="anchor" id="user-content-about">
    ...<svg></svg>
  </a>About
</h2>

Im guessing github is using kramdown#auto-ids which is not not supported in comrak, correct?

This stems from an issue on crates.io as we're trying to link headers to the appropriate section within the readme.

Thanks for your time!

&str instead of &[char] ?

There is this public function:

pub fn parse_document<'a>(arena: &'a Arena<Node<'a, RefCell<Ast>>>,
                          buffer: &[char],
                          options: &ComrakOptions)
                          -> &'a Node<'a, RefCell<Ast>>

Why do you use &[char] for the buffer? Isn't converting a regular String to that type very costly because every character will be forced to use 4 bytes? Why do you not use &str instead?

`Node` is not visible in the docs

Currently the module structure has some pieces that look somewhat like this (type parameters and fields removed for brevity):

mod arena_tree {
    pub struct Node;
}

pub mod nodes {
    pub type AstNode = crate::arena_tree::Node;
}

This means that Node gets exported publicly through comrak::nodes::AstNode, but does not have a documentation page itself (because there is no public item that corresponds to it), so you cannot see what functions it has in the docs. This gets even more confusing as calling functions like Node::traverse produces types that are not even mentioned in the docs, not even behind type aliases.

Checkbox doesn't get created with other formatting in list item

Independently, things work as expected:

- List item 1
- This list item is **bold**
- There is some `code` here

becomes

<ul>
<li>List item 1</li>
<li>This list item is <strong>bold</strong></li>
<li>There is some <code>code</code> here</li>
</ul>

and

- [ ] This item is unfinishd
- [ ] This one too
- [x] This one is completed

becomes

<ul>
<li><input type="checkbox" disabled="" /> This item is unfinishd</li>
<li><input type="checkbox" disabled="" /> This one too</li>
<li><input type="checkbox" disabled="" checked="" /> This one is completed</li>
</ul>

However, if we try to add more formatting to list items, the [ ] doesn't get converted to a checkbox:

- [ ] List item 1
- [ ] This list item is **bold**
- [x] There is some `code` here

becomes

<ul>
<li><input type="checkbox" disabled="" /> List item 1</li>
<li>[ ] This list item is <strong>bold</strong></li>
<li>[x] There is some <code>code</code> here</li>
</ul>

I'm using version 0.1.6 of comrak, and with only the tasklist extension.

O(n^2) for inline link parsing

$ time python -c 'print("[t](/u) " * 10000)' | ./target/release/comrak >/dev/null
real    0m1.599s
user    0m1.593s
sys     0m0.006s

$ time python -c 'print("[t](/u) " * 20000)' | ./target/release/comrak >/dev/null
real    0m6.280s
user    0m6.276s
sys     0m0.004s

$ time python -c 'print("[t](/u) " * 40000)' | ./target/release/comrak >/dev/null
real    0m25.403s
user    0m25.386s
sys     0m0.011s

Hoist Header ID (anchors) code?

Comrak contains code that turns header text into IDs that are ostensibly compatible with the IDs that GitHub creates. I'd like to be able to use that code without generating HTML. I've written a proof-of-concept PR to do this.

My desire for this functionality is due to having written a tiny program that looks for broken "internal links" in Markdown files. It currently only looks to see that the local files referenced in links are present, but I'm adding additional functionality. One of the first things I'm adding is the ability to verify that if a location contains a fragment, then the target file contains markdown that will cause the corresponding anchor to be created.

So, if comrak exposes this functionality, I'll use it and also contribute PRs to increase compatibility. For example, the current comrak code appears to let periods and question marks pass from headers into anchors, whereas GitHub's special sauce appears not to.

I realize that any additional functionality exposed also increases maintenance, so I fully understand why you might not want to do this, but I figure it's worth asking, especially since a single implementation is probably better for the community than parallel similar-but-slightly-different implementations.

autolink plus superscript interact weirdly

^ is valid in URLS, but as a postprocessing pass, strings that should probably get autolinked end up superscripted, mangling the link.

https://www.wolframalpha.com/input/?i=x^2+(y-(x^2)^(1/3))^2=1

run through comrak with -e autolink -e superscript comes out as

<p><a href="https://www.wolframalpha.com/input/?i=x">https://www.wolframalpha.com/input/?i=x</a><sup>2+(y-(x</sup>2)^(1/3))^2=1</p>

The link gets chopped off to become superscript text.

There may be other syntax that interacts similarly-wierdly with the autolinker. I don't have any ideas for how to fix this beyond integrating the autolinker into the inline parser.

FWIW snudown miraculously autolinks that URL as one might expect.

Panic with autolink if text contains `’`

If I run comrak -e autolink on ansi_term's README.md, I get this panic:

$ RUST_BACKTRACE=1 comrak -e autolink README.md
thread 'main' panicked at 'byte index 42 is not a char boundary; it is inside '’' (bytes 41..44) of `(Yes, it’s British English, but you won’t have to write “colour” very often. `', src/libcore/str/mod.rs:2161
stack backtrace:
   0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
   1: std::panicking::default_hook::{{closure}}
   2: std::panicking::rust_panic_with_hook
   3: std::panicking::begin_panic
   4: std::panicking::begin_panic_fmt
   5: core::panicking::panic_fmt
   6: core::str::slice_error_fail
   7: comrak::parser::Parser::postprocess_text_node
   8: comrak::parser::Parser::postprocess_text_nodes
   9: comrak::parser::Parser::postprocess_text_nodes
  10: comrak::main
  11: main

If I replace the characters with ' characters, I don't get this panic. It appears to only be the fancy single quote character that causes the problem; leaving the fancy double quotes ( and ) in works fine.

Related to rust-lang/crates.io#1046. Thanks!

Benchmarks

In light of the speed problems I was probably going to make a benchmarking suite to test what general changes did to the overall speed. I wanted to ask if you had any particular areas that you wanted tested or evaluated that I should include.

Checkboxes only work in HTML

Currently, checkboxes lists are (as far as I understand) are lists where the [ ] and [X] are replaced by some HTML code. While this works for HTML outputs this prevents this features being used in other output (e.g. LaTeX in my use case), while most other features work really pretty nicely. Do you think it would be possible to modify the AST instead of the content of the list item? Since list items have a NodeList elements I suppose it would be possible to add some fields to distinguish between 'normal' list items and the two variants of checkboxes without breaking compatibility.

Anyway, thanks for the work :)

Problem with Back to Back format ranges

I noticed that if you have a few ranges **bold*****bold+italic*** back to back the parser puts them out as <p><strong>bold</strong>***italic***</p>, basically it is having trouble figuring out where to parse the next range. If you could give me an idea of where this might be happening I would be willing to trying working it out and merge a solution in.

Other examples include:
**bold*****bold+italic****italic* outputs
<p><strong>bold</strong><em><strong>bold+italic</strong>**italic</em></p>

Ideally the input should be with ranges that are as simple as possible, but in this edge case it seems like things are breaking down.

Quadratic time consumption on <<<<<<…

$ python -c 'print("<" * 10000)' | time comrak > /dev/null
0.29user 0.00system 0:00.32elapsed 92%CPU (0avgtext+0avgdata 5328maxresident)k
0inputs+0outputs (0major+678minor)pagefaults 0swaps
$ python -c 'print("<" * 20000)' | time comrak > /dev/null
1.15user 0.00system 0:01.19elapsed 97%CPU (0avgtext+0avgdata 7384maxresident)k
0inputs+0outputs (0major+1155minor)pagefaults 0swaps
$ python -c 'print("<" * 40000)' | time comrak > /dev/null
4.62user 0.00system 0:04.65elapsed 99%CPU (0avgtext+0avgdata 11036maxresident)k
0inputs+0outputs (0major+2114minor)pagefaults 0swaps
$ python -c 'print("<" * 80000)' | time comrak > /dev/null
18.76user 0.02system 0:18.84elapsed 99%CPU (0avgtext+0avgdata 18688maxresident)k
0inputs+0outputs (0major+5319minor)pagefaults 0swaps

comrak does not compile on rustc 1.26.0-night

error[E0518]: attribute should be applied to function
 --> /home/username/.cargo/registry/src/github.com-1ecc6299db9ec823/comrak-0.2.8/src/scanners.rs:8:10
  |
8 | #[derive(Parser)]
  |          ^^^^^^ not a function

error: aborting due to previous error

For more information about this error, try `rustc --explain E0518`.
error: Could not compile `comrak`.

Iterator invalidation: detach() during traverse()

Rust typically protects you from iterator invalidation by not allowing you to modify a collection while you are iterating over it. When you use constructs like RefCell, the Rust compiler won't complain, but these checks are still performed when the program is running.

I found out the hard way today that there is a case where you can cause an iterator over nodes to become invalidated and instead of panicking, it will fail silently and just stop iterating.

In Rust pseudo-code, here's what I was doing:

let root = comrak::parse_document(...);

for node in root.traverse() {
    if !want_to_modify_node(node) {
        continue;
    }

    for child in nodechildren() {
        if !want_to_modify_child(node, child) {
            continue;
        }

        child.detach();
    }
}

By detaching the child during traverse, I inadvertantly invalidated the iterator. This didn't result in any memory unsafety. Instead, the iterator just never continues past the node whose child I detached.

This wasn't immediately obvious to me because I assumed that since I was deleting a child, the original node could still be iterated further.

Furthermore, the only reason I figured this out is probably because I am quite experienced in other languages where iterator invalidation is an issue. I imagine a newer programmer might not have come to the same conclusion.

If it isn't possible to panic in these situations with a helpful error message, we should at least add some documentation to all of the iterator methods that can be invalided by a detach.

An even better solution would be to make it so you can detach and still continue traversing the rest of the tree. I'm specifically asking to be able to detach a node that hasn't been traversed yet, I don't expect detaching a parent during traverse() to ever work.


A workaround for this (as with any case of iterator invalidation) is to store the nodes you want to detach and detach them all at once after you're done traversing.

Merge lib.rs and main.rs

I honsestly don't know what a best practice is in Rust these days, but havig the two bin/lib split across files makes he imports duplicated and brittle. My prefereence tend to be to have one entry point that can be ethier an exe or a lib. I feel like it would make tracking upstream easier. I'm happy to make the change if you agree.

Stop using timebomb

I am packaging comrak for Fedora and I found that it uses very old crate timebomb. I would appreciate if you would switch to some more modern dependency.

For example, wait-timeout.

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.