Closed GoogleCodeExporter closed 8 years ago
I think that when the single quote (') is right next to a variable, prettify
shouldn't recognize it as a opening string quote.
Original comment by ganeshad...@gmail.com
on 28 Jun 2014 at 12:36
See this attachment below
Original comment by ganeshad...@gmail.com
on 28 Jun 2014 at 4:38
Attachments:
Two things:
- first, you need to specify a language hint for MATLAB in the PRE tag:
<pre class="prettyprint lang-matlab">...</pre>
- second, you need to include the corresponding javascript file to get the
special MATLAB language handler:
<script src="prettify.js"></script>
<script src="lang-matlab.js"></script>
Once you fix those, single quotes are correctly recognized according to the
context (either matrix transpose or a quoted string)
Original comment by amroamro...@gmail.com
on 8 Jul 2014 at 9:07
Shouldn't the project be detecting the language automatically ?
Original comment by ganeshad...@gmail.com
on 8 Jul 2014 at 7:45
I am only having issues with matlab and for this I have to manually include
lang-matlab.js other languages are doing fine.
Original comment by ganeshad...@gmail.com
on 8 Jul 2014 at 7:49
Only for languages included in the core script. Additional languages (like
MATLAB) are supported as extensions, and must be explicitly enabled.
http://google-code-prettify.googlecode.com/svn/trunk/README.html#langs
Original comment by amroamro...@gmail.com
on 8 Jul 2014 at 8:09
I can spend a couple of weekends on this. Is there someway I can help make
Matlab a standard supported language for you guys ? I can help with VB CSS too
if I get enough time.
Original comment by ganeshad...@gmail.com
on 8 Jul 2014 at 9:06
I'm sure contributions are always appreciated, but I'm not the project owner. I
just contributed lang-matlab.js (as an extension), and help maintain it when
needed :)
Original comment by amroamro...@gmail.com
on 9 Jul 2014 at 6:44
I will put a email to the guy who owns it, "soon" see if he would like an extra
helping hand.
BTW, great extension man, now that I figured it out how to use it !
Original comment by ganeshad...@gmail.com
on 9 Jul 2014 at 9:26
Original issue reported on code.google.com by
ganeshad...@gmail.com
on 28 Jun 2014 at 12:28