<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Yukun&#039;s Blog &#187; JavaScript</title>
	<atom:link href="http://www.yukun.info/blog/category/javascript/feed" rel="self" type="application/rss+xml" />
	<link>http://www.yukun.info</link>
	<description>難しいことは分かりやすく、簡単なことは面白く紹介</description>
	<lastBuildDate>Wed, 25 Aug 2010 15:38:18 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>SafariとChromeでSyntaxHighlighterのPythonコードがハイライトされない問題の解決法</title>
		<link>http://www.yukun.info/blog/2008/09/safari-webkit-python-syntaxhighlighter-issue.html</link>
		<comments>http://www.yukun.info/blog/2008/09/safari-webkit-python-syntaxhighlighter-issue.html#comments</comments>
		<pubDate>Fri, 05 Sep 2008 13:00:17 +0000</pubDate>
		<dc:creator>yukun</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Setting]]></category>

		<guid isPermaLink="false">http://blog.yukun.info/?p=768</guid>
		<description><![CDATA[				追記(2009-02-14): v2.0でこのバグは改善されていました。
				先日「Google Chrome」ベータ版がリリースされましたね。私もV8のパフォーマンス興味に試してみたら速すぎて笑っちゃいまし [...]]]></description>
			<content:encoded><![CDATA[				<p><strong>追記</strong>(2009-02-14): v2.0でこのバグは改善されていました。</p>
				<p>先日「<a href="http://www.google.com/chrome/?hl=ja&amp;utm_source=ja-wh" title="Google Chrome - ブラウザのダウンロード" target="_blank">Google Chrome</a>」ベータ版がリリースされましたね。私もV8のパフォーマンス興味に試してみたら速すぎて笑っちゃいました。ただ同時に、閲覧情報のプライバシーや利用規約の内容等が結構物議を醸していますね。</p>
				<p>まぁ前置きはこれくらいにして、そのChromeで自分のサイトの記事を読み込んだところ<a href="http://code.google.com/p/syntaxhighlighter/" title="syntaxhighlighter - Google Code" target="_blank">SyntaxHighlighter</a><a href="http://code.google.com/p/syntaxhighlighter/wiki/Version_1_5_1" title="Version_1_5_1 - syntaxhighlighter - Google Code - Version 1.5.1 release notes." target="_blank">(v1.5.1)</a>がPythonのソースコードでのみ機能しませんでした。そして同様の問題はSafariでもみられました（どちらもWebKitを使っているからか）。デバッグしてみたらshBrushPython.jsコードのエラーでしたので、該当部分を以下のように修正しました。</p>
				<p>ファイル10行目の中ほどの、<br />
				<code>RegExp("'(?!')*(?:\\.|(\\\\\\')</code><br />
				の部分を、<br />
				<code>RegExp("'(?!')(?:\\.|(\\\\\\')</code><br />
				に変更します。「*」を削除するだけです。</p>
				<blockquote cite="http://code.google.com/p/syntaxhighlighter/issues/detail?id=52&amp;q=python" title="Issue 52 - syntaxhighlighter - Google Code"><p><cite>引用：<a href="http://code.google.com/p/syntaxhighlighter/issues/detail?id=52&amp;q=python" title="Issue 52 - syntaxhighlighter - Google Code" target="_blank">Issue 52 - syntaxhighlighter - Google Code</a></cite><br />
				Agreed, Python brush is 100% broken in all WebKit browsers.  The issue is: SyntaxError: Invalid regular expression: nothing to repeat<br />
				file:///C:/Documents%20and%20Settings/fraser/Desktop/html/dp.SyntaxHighlighter/js/shBrushPython.js<br />
				(line 15)<br />
				It is line 10 in the compressed version and line 15 in the uncompressed version. The offending line is:<br />
				        { regex: new RegExp("'(?!')*(?:\\.|(\\\\\\')|[^\\''\\n\\r])*'", 'gm'), css:<br />
				'string' },<br />
				Doesn't matter what the Python input is.</p>
				<p>Confirming that the alternative shBrushPython.js in comment 1 works great.</p>
				<p>As for the bug in the original regex, it boils down to RegExp("(?!x)*y") which is a negative look-ahead assertion.  But neither I nor WebKit can figure out what the * is for.  Deleting the * solves the problem and makes Python render fine.</p></blockquote>
				<p>Thanks, Neil and Guyon.</p>
				<p>これでSafariとChromeでもハイライトされたPythonのソースコードを読むことが出来ます。試しに→<a href="http://www.yukun.info/blog/2008/07/python-sqlite-insert.html" title="Python: SQLiteにデータを格納、検索、出力 - pysqlite - Yukun's Blog">Python: SQLiteにデータを格納、検索、出力 - pysqlite</a>等どうぞー。<br />
				<h4>関連記事</h4>
				<ul class="similar-posts">
				<li><a href="http://www.yukun.info/blog/2008/11/site-maintenance-translate-script.html" rel="bookmark" title="2008年11月17日">サイトメンテナンスのお知らせ - 日→英翻訳スクリプト</a></li>
				<li><a href="http://www.yukun.info/blog/2008/05/siteexplorer-bookmarklet.html" rel="bookmark" title="2008年5月21日">Yahoo!検索 サイトエクスプローラー を利用するブックマークレット</a></li>
				<li><a href="http://www.yukun.info/blog/2008/01/amateras-uml.html" rel="bookmark" title="2008年1月4日">JavaのソースコードからUMLのクラス図を作成</a></li>
				<li><a href="http://www.yukun.info/blog/2009/02/netbeans-subversion-import-error.html" rel="bookmark" title="2009年2月12日">NetBeans から Subversion でコミットをする際のエラーの解決法の一例</a></li>
				<li><a href="http://www.yukun.info/blog/2009/06/white-list-fiters-spam-mail.html" rel="bookmark" title="2009年6月28日">携帯の迷惑メールフィルタのホワイトリスト（ドメイン）設定例</a></li>
				</ul>
				<p><!-- Similar Posts took 9.443 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.yukun.info/blog/2008/09/safari-webkit-python-syntaxhighlighter-issue.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yahoo!検索 サイトエクスプローラー を利用するブックマークレット</title>
		<link>http://www.yukun.info/blog/2008/05/siteexplorer-bookmarklet.html</link>
		<comments>http://www.yukun.info/blog/2008/05/siteexplorer-bookmarklet.html#comments</comments>
		<pubDate>Tue, 20 May 2008 15:00:00 +0000</pubDate>
		<dc:creator>yukun</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Bookmarklet]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Yahoo!]]></category>

		<guid isPermaLink="false">http://www.yukun.info/trump/19700101/yahoo%e6%a4%9c%e7%b4%a2-%e3%82%b5%e3%82%a4%e3%83%88%e3%82%a8%e3%82%af%e3%82%b9%e3%83%97%e3%83%ad%e3%83%bc%e3%83%a9%e3%83%bc-%e3%82%92%e5%88%a9%e7%94%a8%e3%81%99%e3%82%8b%e3%83%96%e3%83%83%e3%82%af</guid>
		<description><![CDATA[				任意のWebページ上でワンクリックでサイトエクスプローラー - Yahoo!検索のインデックス検索が出来るブックマークレットを作ってみました。
				別ウィンドウで開く
				下のリンクをお気に入りにドラック [...]]]></description>
			<content:encoded><![CDATA[				<p>任意のWebページ上でワンクリックで<a href="http://siteexplorer.search.yahoo.co.jp/">サイトエクスプローラー - Yahoo!検索</a>のインデックス検索が出来るブックマークレットを作ってみました。</p>
				<h3>別ウィンドウで開く</h3>
				<p>下のリンクをお気に入りにドラック＆ドロップして下さい。</p>
				<p><a href="javascript:(function(){void(window.open('http://siteexplorer.search.yahoo.co.jp/advsearch?p='+location.href));})();">サイトエクスプローラー(別)</a></p>
				<p>IEの場合、その際のホップアップは許可してください。ホップアップ確認がわずらわしい場合は下の「同じウィンドウで開く」バージョンを利用してください。</p>
				<h3>同じウィンドウで開く</h3>
				<p><a href="javascript:(function(){ document.location.href='http://siteexplorer.search.yahoo.co.jp/advsearch?p='+escape(document.location.href) })();">サイトエクスプローラー(同)</a></p>
				<h3>使い方</h3>
				<p>任意のサイトで上述で作成したお気に入りをクリックすると、そのサイトのインデックス検索が行われます。</p>
				<h4>関連記事</h4>
				<ul class="similar-posts">
				<li><a href="http://www.yukun.info/blog/2008/11/site-maintenance-translate-script.html" rel="bookmark" title="2008年11月17日">サイトメンテナンスのお知らせ - 日→英翻訳スクリプト</a></li>
				<li><a href="http://www.yukun.info/blog/2008/06/opengl-circle.html" rel="bookmark" title="2008年6月20日">OpenGL: ポリゴンで円の描画</a></li>
				<li><a href="http://www.yukun.info/blog/2008/09/safari-webkit-python-syntaxhighlighter-issue.html" rel="bookmark" title="2008年9月5日">SafariとChromeでSyntaxHighlighterのPythonコードがハイライトされない問題の解決法</a></li>
				<li><a href="http://www.yukun.info/blog/2010/04/setup-eclipse-64bit-android.html" rel="bookmark" title="2010年4月25日">Windows7 64bitにEclipseでAndroid開発環境をセットアップ</a></li>
				<li><a href="http://www.yukun.info/blog/2008/11/actionscript-flash-load-server-image-file.html" rel="bookmark" title="2008年11月21日">ActionScript: 画像ファイルをダウンロードして表示 - Loaderクラス</a></li>
				</ul>
				<p><!-- Similar Posts took 13.797 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.yukun.info/blog/2008/05/siteexplorer-bookmarklet.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
