Skip to content

Commit

Permalink
Fixed automatic syntax highlighting for UI
Browse files Browse the repository at this point in the history
Sumh <42424861@qq.com>
  • Loading branch information
Sumh committed Apr 26, 2011
1 parent f9f9619 commit e4d6f9d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
@@ -0,0 +1,4 @@

### Credit ###

Automatic syntax highlighting from [Sunlight](http://sunlightjs.com/)
16 changes: 14 additions & 2 deletions classes/controller/jqdoc.php
Expand Up @@ -40,7 +40,7 @@ public function before()
{
copy("$media/$file", "{$config['doc-dir']}/$file");
}
else if ($file !== '.' AND $file !== '..' AND ! is_dir("$media/$file"))
else if ($file !== '.' AND $file !== '..' AND ! is_dir("$media/$file"))
{
copy("$media/$file", "$docroot/$file");
}
Expand Down Expand Up @@ -425,7 +425,7 @@ public function bookmark($version)
Display compile notes=Yes
[WINDOWS]
main="jQuery and UI reference $version (Generated by jQdoc, author: oalite@gmail.com)","$jQuery.hhc","$jQuery.hhk","$docroot\categories\index.htm","$docroot\categories\index.htm",,,,,0x7B520,222,0x1046,[10,10,640,450],0xB0000,,,,,,0
main="jQuery and UI reference $version (Powered by jQdoc, author: oalite@gmail.com)","$jQuery.hhc","$jQuery.hhk","$docroot\categories\index.htm","$docroot\categories\index.htm",,,,,0x7B520,222,0x1046,[10,10,640,450],0xB0000,,,,,,0
[FILES]
jquery.min.js
Expand Down Expand Up @@ -595,6 +595,18 @@ protected function load_ui($path, array $components)
foreach($component as $c)
{
$ui = file_get_contents("$uri/$c");
$ui = str_replace(array(
'<pre>&lt;!DOCTYPE',
'<pre><code>',
'</code></pre>',
'<pre>'
), array(
'<pre class="sunlight-highlight-html">&lt;!DOCTYPE',
'<pre class="sunlight-highlight-javascript">',
'</pre>',
'<pre class="sunlight-highlight-javascript">'
), $ui);

file_put_contents("{$path}{$name}/$c.htm", strtr($this->template, array(
'{{path}}' => '../../',
'{{title}}' => $c,
Expand Down
Binary file modified jQuery-UI-Reference-1.5.1.chm
Binary file not shown.

0 comments on commit e4d6f9d

Please sign in to comment.