DEV Community

Jeremy Woertink
Jeremy Woertink

Posted on • Updated on

A bug in this site

I found a bug!

{title: this.should_not.have(quotes).around(itself)}
Enter fullscreen mode Exit fullscreen mode

It seems that the site parses the title: and then puts quotes around it. Maybe this is actually a Jekyll error?

UPDATE

As of 7/10/18 this bug has been fixed. Thanks to the devs!

Top comments (8)

Collapse
 
andy profile image
Andy Zhao (he/him)

Actually, this is intended to all escape double quotes " properly. :)

We had a few edge cases with this, but I can't remember what the main edge case was. @maestromac probably can explain better since he worked on it.

Collapse
 
jwoertink profile image
Jeremy Woertink

I'm not sure that I follow. This is definitely an edge case bug though lol. Should be somewhat an easy fix since the title of the post is inside that --- block. If it only adds quotes to the title: inside that block, then it should be fine.

Collapse
 
andy profile image
Andy Zhao (he/him) • Edited

Yeah, for example title: some title will have quotes around some title. We have some logic that will add the quotes and escape if there are double quotes in some title already. Sorry I wasn't clear!

Did you have quotes on your title originally that were appended after you saved it, and then you removed?

Thread Thread
 
jwoertink profile image
Jeremy Woertink • Edited

No, I'm not even talking about the title. I'm talking about adding a code block in to the body of the post where the code sample in that code block contains the literal characters title:. It adds quotes in to the code block example when there shouldn't be any quotes. If you take a look at this screen shot, maybe that will be a bit more clear. You'll see I circled the two " characters in this bit of code, but I never typed those.

hmm.. not sure where my screen shot went. I uploaded it... Oh, do I have to copy and paste the link in here? this

Thread Thread
 
andy profile image
Andy Zhao (he/him) • Edited

OH I see what you mean. Hah yeah that's definitely an edge case. Woops.

Also to embed/inline images, you would post it like you do with Markdown:
[alt-text-for-your-image](https://dev.to/img.png)

Now that I wrote that though, we could make it even more straightforward to post an image.

Thread Thread
 
jwoertink profile image
Jeremy Woertink

😅 haha. Yeah, it was just a strange case for when you're trying to write a code tutorial, but telling people "don't type it like this" lol.

The image thing I think confused me because I clicked a button to upload a photo, and then just sort of assumed it added in (sorta like github issues does). Not a huge deal :)

Anyway, thanks for responding!

Thread Thread
 
andy profile image
Andy Zhao (he/him)

We fixed it :) Thanks to @maestromac

Thread Thread
 
jwoertink profile image
Jeremy Woertink

sweet! Thanks guys!