-
Notifications
You must be signed in to change notification settings - Fork 196
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
Question: Where is the language class set? #725
Comments
If you landed here looking for a temporary workaround, a very kludgy hack is to insert the following code at the bottom of your index.html.md <script>
function addTabPrefix(lang) { $('.highlight.' + lang).addClass('tab-' + lang); }
function fixLanguages() { $('body').data().languages.forEach(addTabPrefix); }
$(fixLanguages);
</script> |
@dpilafian is it not in lib/multilang.rb L.6 ? gulp-slate doesn't seem to have an equivalent modification. Think it is an issue for that project. |
👍 if this is a problem only with gulp-slate, and not us, it's probably best to submit the issue to them! |
This issue was filed as a question not a bug. I intend to fix it on gulp-slate (original question noted: this is not a problem with regular Slate). _lang.js used to look for the language class but now looks for the tab class, however the old language class remains (that's where I got derailed). Since the language class is not used by _lang.js anymore, it doesn't matter where the language class is set (although, I'm still kind of curious). BTW, gulp-slate does indeed pull down the new multilang.rb file, but it does not appear to get executed. At least now I know where to look to fix it. |
Ah, sorry, I misunderstood! Yup, |
Cool, thanks! |
Where is the language class set?
The multiple-tabs-per-language feature (issue #58) seems to have broken gulp-slate by changing the selector (
"highlight.python"
->"highlight.tab-python"
) but not changing the class on the elements.Commit:
1fd867c#diff-b452c5e9ae6b467f9652d0af37b951fd
The effect is that the all code snippets are displayed all the time. However, this is not a problem with regular Slate only with gulp-slate. With gulp-slate, the
<pre>
block has thepython
class but not thetab-python
class. Regular Slate has both classes.The text was updated successfully, but these errors were encountered: