Skip to content

{:class="center"} on images is no longer rendering #354

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
carols10cents opened this issue Dec 21, 2018 · 4 comments · Fixed by #415
Closed

{:class="center"} on images is no longer rendering #354

carols10cents opened this issue Dec 21, 2018 · 4 comments · Fixed by #415
Labels

Comments

@carols10cents
Copy link
Member

I happened to land on this post that I happened to have written, unfortunately I don't happen to remember why I added {:class="center"} on the image in the markdown that isn't being interpreted and currently looks like this:

screen shot 2018-12-21 at 2 22 27 pm

I don't remember if that's a markdown feature, a jekyll feature, or a hack.

Is this obsolete and something that should just be removed? Or should the rendering be fixed? Is this feature used anywhere else on the blog? More that I don't know :P

@steveklabnik
Copy link
Member

I am not sure! We need to investigate though.!

@steveklabnik
Copy link
Member

I did some digging. apparently it's a feature of kramdown: https://about.gitlab.com/2016/07/19/markdown-kramdown-tips-and-tricks/#applying-classes

which the old blog was using:

kramdown (= 1.17.0)

This appears to be non-standard https://stackoverflow.com/questions/1058933/can-i-define-a-class-name-on-paragraph-using-markdown

I think in this specific case, we can remove it, as the class isn't really doing anything, but we should also audit posts to check for any other usages of this.

@jplatte
Copy link
Contributor

jplatte commented Oct 7, 2019

I've rged for any remaining uses of this kramdown feature and actually found some! I'll open a PR shortly to remove them, just want to note that I have also found cases where this makes a visual difference (e.g. the post on incremental compilation). If images that aren't wide enough should always be centered, I'm happy to make a PR for that as well.

@steveklabnik
Copy link
Member

Thanks so much! Yeah, if we can actually center them, that'd be great too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants