geraki / io-2012-slides

Automatically exported from code.google.com/p/io-2012-slides
0 stars 0 forks source link

adding support for syntax highlighting for other languages #26

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
it seems that the code to do highlighting of code is done in the prettify 
module under ./js/prettify

but even after adding a new js file (eg, lang-pig.js) i can't get it to be used 
by the slides.  after playing with it a bit, i actually can't get it to change 
the highlighting of the samples either.

i take it

<pre class="prettyprint" data-lang="css">
&lt;style&gt;
  p { color: pink }
  b { color: blue }
&lt;/style&gt;
</pre>

the data-lang tag tells the system to use ./js/prettify/lang-css.js for 
parsing?    when i change "css" to "xxx" that doesn't change the highlighting.  
any pointers here?   i'm trying to add support for apache pig.

thanks,

- karan

Original issue reported on code.google.com by ka...@thebhatias.org on 2 Apr 2013 at 1:57

GoogleCodeExporter commented 8 years ago
The data-lang attribute only effects the label that is applied to the code 
block.
For giving language hints, prettify accepts lang-xxx as a class. See:

https://code.google.com/p/google-code-prettify/wiki/GettingStarted#Language_Hint
s

Original comment by ebi...@gmail.com on 2 Apr 2013 at 3:16

GoogleCodeExporter commented 8 years ago
ok, thanks that definitely helps.

i downloaded prettify source and added my lang-pig.js, compiled and replaced 
the ./js/prettify directory with prettify's distrib/prettify-small.tgz 

i tested the lang-pig.js from the example html doc from prettify and that 
works.  but when coping it over to io-2012-slides, i still can't get it loaded 
correctly.  one difference is that prettify uses run_prettify.js and you are 
using prettify.js.  the run_prettify accepts lang=pig options when loading, but 
i can't find where to specify this in io-2012-slides.

or said another way:  how do i get my customer lang-pig.js to get loaded?

thanks for any pointers :-)

- k

Original comment by ka...@thebhatias.org on 2 Apr 2013 at 11:41

GoogleCodeExporter commented 8 years ago
ERROR org.apache.hadoop.mapreduce.lib.jobcontrol.JobControl - Error while 
trying to run jobs.
java.lang.IncompatibleClassChangeError: Found interface 
org.apache.hadoop.mapreduce.JobContext, but class was expected

Original comment by hardik.b...@wishtreetech.com on 23 Jan 2014 at 6:37