Skip to content
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

add show-language plugin to prism build #1209

Merged
merged 1 commit into from
May 31, 2017
Merged

Conversation

lislis
Copy link
Contributor

@lislis lislis commented May 29, 2017

shows snippet language automatically on hover. works automatically.
Looks like this out of the box

screen shot 2017-05-29 at 12 52 01
screen shot 2017-05-29 at 12 52 15

@BanzaiMan
Copy link
Contributor

Nice!

@BanzaiMan BanzaiMan merged commit c04b063 into gh-pages May 31, 2017
@BanzaiMan BanzaiMan deleted the lp-prism-filename branch May 31, 2017 13:58
@plaindocs
Copy link
Contributor

Awesome!

The fiddly bit is displaying the filename, which is what requires the ugly CSS in Kramdown and the extra messing around. Do we think that is worth it?

@lislis
Copy link
Contributor Author

lislis commented Jun 6, 2017

@plaindocs I thought this would be accomplished with {: data-language=" a filename that is not technically a language"} after the code snippet? Or am I missing something?

@plaindocs
Copy link
Contributor

I think there are some extra steps, but I get a bit lost reading through

PrismJS/prism#891
PrismJS/prism#910

Maybe from issue

pre[data-language]:before {
  content: attr(data-file);
  position: absolute;
  top: 0;
  right: 0;
}

is sufficient? Either way, just setting the CSS as you suggest isn't sufficient for it to display.

@lislis
Copy link
Contributor Author

lislis commented Jun 6, 2017

@plaindocs I made this #1235

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

Successfully merging this pull request may close these issues.

3 participants