kneufeld/consolemd

``` syntax is not rendered correctly

Opened this issue · 6 comments

Here's an example from rustc --explain E0425

An unresolved name was used.

Erroneous code examples:

```
something_that_doesnt_exist::foo;
// error: unresolved name `something_that_doesnt_exist::foo`

// or:

trait Foo {
    fn bar() {
        Self; // error: unresolved name `Self`
    }
}

// or:

let x = unknown_variable;  // error: unresolved name `unknown_variable`
```

Please verify that the name wasn't misspelled and ensure that the
identifier being referred to is valid for the given situation. Example:

```
enum something_that_does_exist {
    Foo,
}
```

Or:

```
mod something_that_does_exist {
    pub static foo : i32 = 0i32;
}

something_that_does_exist::foo; // ok!
```

Or:

```
let unknown_variable = 12u32;
let x = unknown_variable; // ok!
```

If the item is not defined in the current module, it must be imported using a
`use` statement, like so:

```
use foo::bar;
bar();
```

If the item you are importing is not defined in some super-module of the
current module, then it must also be declared as public (e.g., `pub fn`).

and here's how it's rendered:

Screenshot from 2019-07-22 13-19-00

Thanks for using consolemd.

What version of consolemd are you using? Your example text seems to work fine with consolemd 0.5.1 and commonmark 0.8.1. I'm very surprised that "```" doesn't work for you as that was one of the first things I validated and one of the reasons I'm using commonmark.

❰meena❙~❱✔≻ /home/meena/.local/venvs/consolemd/bin/pip freeze
click==6.7
commonmark==0.8.1
consolemd==0.5.1
future==0.17.1
Pygments==2.3.1
setproctitle==1.1.10
❰meena❙~❱✔≻ 

I think you'll have to provide a link to a file as my copy pasting of the example text doesn't let me reproduce the issue.

here's a paste of rustc --explain E0425
could this be caused by the combination of MANWIDTH=72?

Yeah, I can reproduce when usingMANWIDTH. unset MANWIDTH will at least temporarily solve your problem... I'll have a look.

Ug... I think I've backed myself into a corner by adding -w and "fixing" issue #12. I think I need to investigate dropping commonmark and using a different markdown parser. Yuck.