TonyXT / google-code-prettify

Automatically exported from code.google.com/p/google-code-prettify
0 stars 0 forks source link

Asterisk and slashes force following text to be interpreted as comments #38

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

<pre class="prettyprint">
task :system_specs_gem => ['my:setup'] do
  gem = Dir.glob(&#8221;pkg/*.gem&#8221;).first
end

gem = Dir.glob(&#8221;pkg/*.gem&#8221;).first
gem = Dir.glob(&#8221;pkg/*.gem&#8221;).first
</pre>

What is the expected output?  What do you see instead?
I would like to see "pkg/*.gem" interpreted as a normal string, and
everything after to be business as usual.

What version are you using?  On what browser?
31 Aug 2007.  Firefox 2.0.0.12 on Debian Linux.

Please provide any additional information below.
If you give me a hint maybe I can hack the JavaScript.  I took a glance but
was blinded by all the regexen.

Original issue reported on code.google.com by mhawthorne on 28 May 2008 at 2:42

GoogleCodeExporter commented 8 years ago
What language is this?  Is it a BASIC dialect?

I just added language specific formatters, so doing
  <pre class="prettyprint lang-sh">
                          ^^^^^^^------- specifies language to use
should address this problem by using a shell script formatter that recognizes #
comments but not // or /* comments.

Original comment by mikesamuel@gmail.com on 5 Jul 2008 at 3:59

GoogleCodeExporter commented 8 years ago
A BASIC dialect?  Dude, it's Ruby!

Your solution sounds grand.  I'll take a look when I get a chance.  Thanks!

Original comment by mhawthorne on 7 Jul 2008 at 9:18

GoogleCodeExporter commented 8 years ago
Oh ok.  I thought Ruby looked more perly.  I'll have to learn it one of these 
days.

Original comment by mikesamuel@gmail.com on 8 Jul 2008 at 4:46

GoogleCodeExporter commented 8 years ago
Figure out whether ruby allows codepoint 8221 as a quoting character or whether 
this
is a smart-quotes issue.

Original comment by mikesamuel@gmail.com on 6 Jan 2009 at 6:01

GoogleCodeExporter commented 8 years ago
This looks like a smart quotes issue.

Passing the program
  print(”hello world”)
, where ” is the smart close quote codepoint 8221/0x201D, to
  ruby -Ku
produces the following error messages
  -:1: warning: parenthesize argument(s) for future version
  -:1: undefined local variable or method `world”' for main:Object (NameError)

Please see "Why doesn't Prettyprinting of strings work on WordPress?" in the 
FAQ at
http://google-code-prettify.googlecode.com/svn/trunk/README.html

Original comment by mikesamuel@gmail.com on 6 Jan 2009 at 6:30