Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
XHTML compliance
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Ernest  
View profile  
 More options Jul 31 2007, 2:29 am
From: Ernest <panquetofo...@gmail.com>
Date: Tue, 31 Jul 2007 06:29:12 -0000
Local: Tues, Jul 31 2007 2:29 am
Subject: XHTML compliance
Hello,

I've been using server side syntax highlighter solutions and wanted a
js one. I discovered this amazing piece of software and I think it is
great!

Sorry if this is alredy discussed...

IMHO, the lack of xhtml support (<pre> doesn't have an attribute
'name' in XHTML, so it is not valid) is a great disadvantage as it is
necessary for the project to succeed.

I think it would be better to look for code inside code tags
(<pre><code> var a; </code></pre>) rather than simple pre tags for the
sake of semantics, or giving the user the option to look for code
within any element, searching by class name (e.g. <div class="code
php">$foo='bar';</div>).

Changes in the code would be minimal. It took me 5 minutes to get the
uncompressed js file changed so that it works like this:

window.onload = function(){
    dp.SyntaxHighlighter.ClipboardSwf = '/swf/clipboard.swf';
    dp.SyntaxHighlighter.HighlightAll('code');
    /* 'code' being the class of the <code> elements I want to
highlight */

};

In the xhtml, the code element has 2 classes, the first indicates that
the element must be highlighted, and the second indicates the
language.

<pre>
   <code class="code js">

   var foo = function(){ return 'bas'; };

   </code>
</pre>

By the way, it would be cool to automatically include the language
files as needed instead of including them manually.

Congratulations again for the great job.

Best Regards,

Ernest


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google