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

Use newer `language-` class name prefix #1037

Merged
merged 1 commit into from May 7, 2013

Conversation

Projects
None yet
6 participants
@djui
Contributor

djui commented May 6, 2013

This change makes it partly possible to use Jekyll+RedCarpet+Prism.js without using a plugin.

Another change will respect Jekyll's pygments configuration option and not render the code block using Pygments. Together, these two changes allow using prism.js with Jekyll out of the box.

Use newer `language-` class name prefix
This change makes it partly possible to use Jekyll+RedCarpet+Prism.js without using a plugin.

Another change will respect Jekyll's `pygments` configuration option and not render the code block using Pygments. Together, these two changes allow using prism.js with Jekyll out of the box.
@mattr-

This comment has been minimized.

Show comment
Hide comment
@mattr-

mattr- May 7, 2013

Member

I don't see a problem with this. 👍 from me.

Member

mattr- commented May 7, 2013

I don't see a problem with this. 👍 from me.

@caspervonb

This comment has been minimized.

Show comment
Hide comment
@caspervonb

caspervonb May 7, 2013

Neat, was looking to patch this in today myself.

Neat, was looking to patch this in today myself.

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr May 7, 2013

Member

This is only one change. Where's the other?

My biggest concern is that this breaks all the CSS styles people have written for custom code highlighting :/ No backwards-compatibility, unless you set class="lang language-lang".

Member

parkr commented May 7, 2013

This is only one change. Where's the other?

My biggest concern is that this breaks all the CSS styles people have written for custom code highlighting :/ No backwards-compatibility, unless you set class="lang language-lang".

@djui

This comment has been minimized.

Show comment
Hide comment
@djui

djui May 7, 2013

Contributor

The other one is in a separate pull-request ( #1038 ) because they can be seen separate.

I agree with the backwards-compatibility point. Using both class names would be a sufficient solution.

Contributor

djui commented May 7, 2013

The other one is in a separate pull-request ( #1038 ) because they can be seen separate.

I agree with the backwards-compatibility point. Using both class names would be a sufficient solution.

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr May 7, 2013

Member

Great! Keep it backwards-compatible, fix the tests and we're good to go.

Member

parkr commented May 7, 2013

Great! Keep it backwards-compatible, fix the tests and we're good to go.

parkr added a commit that referenced this pull request May 7, 2013

Merge pull request #1037 from djui/patch-1
Add newer `language-` class name prefix to code blocks

@parkr parkr merged commit 6b9ef70 into jekyll:master May 7, 2013

1 check failed

default The Travis build failed
Details

parkr added a commit that referenced this pull request May 7, 2013

parkr added a commit that referenced this pull request May 7, 2013

parkr added a commit that referenced this pull request May 7, 2013

@Rowno

This comment has been minimized.

Show comment
Hide comment
@Rowno

Rowno May 8, 2013

Contributor

Any chance you can add a something like a data-lang attribute? I was adding language labels to my code block using the CSS below, but this change breaks it. 😢

code:before {
    content: attr(class);
}
Contributor

Rowno commented May 8, 2013

Any chance you can add a something like a data-lang attribute? I was adding language labels to my code block using the CSS below, but this change breaks it. 😢

code:before {
    content: attr(class);
}
@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr May 8, 2013

Member

The diff here doesn't reflect the changes entirely. We now use class="<lang> language-<lang>" when writing codeblocks, thus merely adding language-<lang> to the list. Nothing we changed could have ruined the code you have already written, as far as I can tell! :)

Member

parkr commented May 8, 2013

The diff here doesn't reflect the changes entirely. We now use class="<lang> language-<lang>" when writing codeblocks, thus merely adding language-<lang> to the list. Nothing we changed could have ruined the code you have already written, as far as I can tell! :)

@Rowno

This comment has been minimized.

Show comment
Hide comment
@Rowno

Rowno May 8, 2013

Contributor

It ruined it because now I get css language-css etc in my labels (instead of just css), which is why I suggested adding a data-lang attribute.

Contributor

Rowno commented May 8, 2013

It ruined it because now I get css language-css etc in my labels (instead of just css), which is why I suggested adding a data-lang attribute.

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr May 9, 2013

Member

Gah, sorry, I didn't even really process the code. Late-night brain mode :) I am weary about adding more attributes :/

Member

parkr commented May 9, 2013

Gah, sorry, I didn't even really process the code. Late-night brain mode :) I am weary about adding more attributes :/

@Rowno

This comment has been minimized.

Show comment
Hide comment
@Rowno

Rowno May 9, 2013

Contributor

Oh well, it was nice while it lasted. 😞

Contributor

Rowno commented May 9, 2013

Oh well, it was nice while it lasted. 😞

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr May 9, 2013

Member

Tell you what: submit a PR and we'll talk it over with @mattr-. I may be weary, but I'm not opposed. :)

Member

parkr commented May 9, 2013

Tell you what: submit a PR and we'll talk it over with @mattr-. I may be weary, but I'm not opposed. :)

@Rowno

This comment has been minimized.

Show comment
Hide comment
@Rowno

Rowno May 9, 2013

Contributor

Done #1066

Contributor

Rowno commented May 9, 2013

Done #1066

@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.