sgrif / diesel.rs-website

MIT License
32 stars 97 forks source link

Batch insert example in the "All about inserts" guide renders incorrectly #49

Closed jbcden closed 6 years ago

jbcden commented 6 years ago
screen shot 2017-12-24 at 12 12 14 pm

The main issue is the line:

let user_form = serde_json::from_str::>(json)?;

which should actually be:

let user_form = serde_json::from_str::<Vec<UserForm>>(json)?;

As per this. Not sure if this falls under the umbrella of https://github.com/sgrif/diesel.rs-website/issues/47 but wanted to note it here. I'm not too familiar with slim and I don't see anything obviously wrong with https://github.com/sgrif/diesel.rs-website/blob/master/source/views/guides/all-about-inserts.html.slim#L417 but perhaps I'm missing something obvious.

Looking at the rendered html it looks like <Vec<UserForm> portion of the type is being rendered as html:

screen shot 2017-12-24 at 12 20 24 pm
sgrif commented 6 years ago

Ugh literally every time I publish a guide I forget that <pre><code> doesn't escape HTML tags >_>

sgrif commented 6 years ago

Should be fixed now. Let me know if I missed any.