Closed GoogleCodeExporter closed 8 years ago
In test file change <pre class="codemain lang-vb"> to <pre class="prettyprint
lang-vb"> to work with stock rev 64 of prettify.js
Original comment by skyhawk...@gmail.com
on 20 Feb 2009 at 6:43
I've an example with <pre class="prettyprint lang-vb"> at
http://officeadd.in/vba_and_excel/vba_code_test.aspx
To make the single line comments work i've had to use ''# (the first single
quote so
VB parses it correctly and the following '# so that Prettify shows the comments)
Original comment by mark.nold
on 30 Mar 2009 at 12:28
Original comment by mikesamuel@gmail.com
on 19 May 2009 at 5:27
Thanks for the great example.
I can't repeat the problem. Can you make sure your example is loading
lang-vb.js?
Original comment by mikesamuel@gmail.com
on 19 May 2009 at 4:45
It's still doing it on this thread:
http://www.dreamincode.net/forums/index.php?showtopic=87819&hl=
Notice the first comment in the [code] block. It continues past the comment and
includes Sub Main() in grey/comment coloring.
It's using <pre class='codemain lang-vb'> and I have lang-vb uploaded and it
should
be calling it however I can't tell for sure.
Original comment by skyhawk...@gmail.com
on 19 May 2009 at 4:49
Mike i'm sorry, this was user error. I'll document here for others with the
same problem.
The page http://officeadd.in/code/prettify_js_-_syntax_highlighting.aspx now
works
properly and the first "VBA Example" which failed, now works.
To get vb syntax highlighting working correctly you need three things;
<script type="text/javascript"
src="/External/css/prettify/prettify.js"></script>
<script type="text/javascript" src="/External/css/prettify/lang-vb.js"></script>
and a PRE block around your code eg:
<PRE class="prettyprint lang-vb">
Function SomeVB() as string
' do stuff
End Function
</PRE>
If you are experiencing problems with prettify and VB comments it's probably
because
you haven't loaded lang-vb.js in addition to prettify.js
Thanks Mike, excellent work. I'll update my page with these details.
PS: Skyhawk, i've checked your page and you are missing lang-vb.js as well.
Original comment by mark.nold
on 20 May 2009 at 1:29
I'm glad it works for you now. Will close this bug. Please open a new bug if
you
have further problems.
Original comment by mikesamuel@gmail.com
on 20 May 2009 at 2:45
Original issue reported on code.google.com by
skyhawk...@gmail.com
on 20 Feb 2009 at 6:41Attachments: