So-net無料ブログ作成

SyntaxHighlighterの動きを確認してみる [雑記]

コードの表示にはなるべくSyntaxHighlighterを使うようにしているのだが,期待通りに表示されないことがあるので,いろいろ試してみる.

たとえば,前回のjavascriptのコードで,
var url = 'http://weather.livedoor.com/forecast/webservice/json/v1?city=' + city;

というのがあるのだが,これをSyntaxHighlighterで表示させると,こうなる(以下はスクリーンショットの画像).
スクリーンショット 2015-05-02 10.53.01.png
アンカータグが追加されてしまう.

auto-linksの設定が影響しているのかと思って,falseにしてみてもアンカータグは変わらない.

原因がわからない.

So-netブログでSyntaxHighlightを使う:おぼえがき:So-net blog
を参考にしてSo-netブログの設定を変えてみたのだが,それでも変わらない.

と思ってたら,記事の編集の,詳細設定に「URL自動リンク」というのがあって,リンクするになっていたのでリンクしないにしてみた.
どうやらこれが悪さをしていたようだ.
上記のブログで,「キーワード広告の表示が悪さをしている」って書いてあったのを読んでもしかしてと思ったら正解だった.うちはもとからキーワード広告はオフだったけど,似たような設定で探したら「URL自動リンク」に気がつけた.感謝.
毎回詳細設定で変更するのは面倒だ.
管理ページの[設定]->[記事の初期設定]->[URL自動リンク]に設定があるので,ここをリンクしないにしておく.

ちなみに,管理ページの[デザイン]->[テンプレート管理]->HTML編集のテンプレートは,こんな感じ.</body>の直前に以下のように挿入してる.
<!-- Syntax Highlighter -->
<link href="http://alexgorbatchev.com/pub/sh/current/styles/shCoreDefault.css" rel="stylesheet" type="text/css">
<script src="http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js" type="text/javascript"></script>
<script src="http://alexgorbatchev.com/pub/sh/current/scripts/shAutoloader.js" type="text/javascript"></script>
<script type="text/javascript">
SyntaxHighlighter.autoloader(
'applescript            http://alexgorbatchev.com/pub/sh/current/scripts/shBrushAppleScript.js',
'actionscript3 as3      http://alexgorbatchev.com/pub/sh/current/scripts/shBrushAS3.js',
'bash shell             http://alexgorbatchev.com/pub/sh/current/scripts/shBrushBash.js',
'coldfusion cf          http://alexgorbatchev.com/pub/sh/current/scripts/shBrushColdFusion.js',
'cpp c                  http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCpp.js',
'c# c-sharp csharp      http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCSharp.js',
'css                    http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCss.js',
'delphi pascal          http://alexgorbatchev.com/pub/sh/current/scripts/shBrushDelphi.js',
'diff patch pas         http://alexgorbatchev.com/pub/sh/current/scripts/shBrushDiff.js',
'erl erlang             http://alexgorbatchev.com/pub/sh/current/scripts/shBrushErlang.js',
'groovy                 http://alexgorbatchev.com/pub/sh/current/scripts/shBrushGroovy.js',
'java                   http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJava.js',
'jfx javafx             http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJavaFX.js',
'js jscript javascript  http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJScript.js',
'perl pl                http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPerl.js',
'php                    http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPhp.js',
'text plain             http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPlain.js',
'py python              http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPython.js',
'ruby rails ror rb      http://alexgorbatchev.com/pub/sh/current/scripts/shBrushRuby.js',
'sass scss              http://alexgorbatchev.com/pub/sh/current/scripts/shBrushSass.js',
'scala                  http://alexgorbatchev.com/pub/sh/current/scripts/shBrushScala.js',
'sql                    http://alexgorbatchev.com/pub/sh/current/scripts/shBrushSql.js',
'vb vbnet               http://alexgorbatchev.com/pub/sh/current/scripts/shBrushVb.js',
'xml xhtml xslt html    http://alexgorbatchev.com/pub/sh/current/scripts/shBrushXml.js'
);
SyntaxHighlighter.all();
SyntaxHighlighter.defaults['toolbar'] = false;
SyntaxHighlighter.defaults['auto-links'] = false;
</script>
<style type="text/css">
/*--- Syntax Highlighter Scripts Generator 縦スクロールを出さない ---*/
.syntaxhighlighter {
overflow-y: hidden !important;
padding: 1px !important;
}
</style>
<!-- Syntax Highlighter -->

</body>


実際のSyntaxHighlighterの表示はこれ.
var url = 'http://weather.livedoor.com/forecast/webservice/json/v1?city=' + city;


これが(アンカータグがなくて)ちゃんと表示されていればOKのはず.

もし,困っている人がいたら参考になるかも.

nice!(0)  コメント(60)  トラックバック(0) 
共通テーマ:日記・雑感

nice! 0

コメント 60

CrbnuttefsGF

no fax payday loan today - http://personalnerloan.org/ 100 guaranteed payday loans <a href=http://personalnerloan.org/>easy personal loans</a> ’
by CrbnuttefsGF (2017-09-21 15:42) 

お名前(必須)

free samples of cialis
<a href="http://cialisofkl.com/">online cialis</a>
cialis free sample
<a href=http://cialisofkl.com/>cialis online</a> ’
by お名前(必須) (2017-09-23 11:09) 

お名前(必須)

cialis soft tabs online
<a href="http://cialisovnas.com/">cialis buy</a>
cialis 40 mg
<a href=http://cialisovnas.com/>cheap cialis</a> ’
by お名前(必須) (2017-09-23 20:40) 

お名前(必須)

order cialis no prescription
<a href="http://cialiseimah.com/">buy cialis</a>
cialis tablete
<a href=http://cialiseimah.com/>cheap cialis</a> ’
by お名前(必須) (2017-09-25 22:34) 

お名前(必須)

cialis order canada
<a href="http://cialisoakdm.com/">cialis online</a>
cialis soft tabs dosage
<a href=http://cialisoakdm.com/>buy cialis</a> ’
by お名前(必須) (2017-09-25 23:00) 

お名前(必須)

cialis for women
<a href="http://cialisjrncd.com/">cheap cialis</a>
herbal cialis
<a href=http://cialisjrncd.com/>cialis online</a> ’
by お名前(必須) (2017-09-25 23:12) 

VtnoFeeRSY

cialis sold in canada - https://jrucialis.com
generic brand for cialis <a href=https://jrucialis.com>cialis</a>
by VtnoFeeRSY (2017-09-27 00:13) 

KrtpbarcomDE

cialis pill identifier - http://haycialis.com/
generic cialis soft <a href=http://haycialis.com/>generic cialis</a> ’
by KrtpbarcomDE (2017-09-27 00:13) 

お名前(必須)

brand cialis cheap order - http://cialiskanr.com
buying generic cialis <a href=http://cialiskanr.com>generic cialis</a> ’
by お名前(必須) (2017-09-27 10:43) 

お名前(必須)

branded cialis drugstore - https://cialisonlin.com
average cost of cialis <a href=https://cialisonlin.com>buy cialis</a> ’
by お名前(必須) (2017-09-27 11:22) 

お名前(必須)

need personal loan
<a href="https://cashrvyn.com/">cash advance loans</a>
online installment loans
<a href="https://cashrvyn.com/">payday loans</a> ’
by お名前(必須) (2017-09-29 00:37) 

お名前(必須)

online cash loans
<a href="https://paydayrvjlo.com/">get payday loan</a>
bank accounts
<a href=https://paydayrvjlo.com/>bad credit payday loans</a> ’
by お名前(必須) (2017-09-29 00:37) 

LmazJidilsOU

loan small business
<a href="https://paydayrvyaf.com/">pay day loan</a>
bad credit instant approval payday loans
<a href=https://paydayrvyaf.com/>cash advance definition</a> ’
by LmazJidilsOU (2017-09-29 01:16) 

お名前(必須)

check into cash
<a href="https://paydaaexc.com/">online payday loans</a>
bank accounts online
<a href=https://paydaaexc.com/>payday loans online direct lenders only</a> ’
by お名前(必須) (2017-09-29 01:37) 

お名前(必須)

100 guaranteed payday loan
<a href="https://loansbtxsa.org/">online loan</a>
100 guaranteed payday loan
<a href=https://loansbtxsa.org/>online payday loan</a> ’
by お名前(必須) (2017-09-29 02:11) 

PamefloanoYJ

emergency personal loan
<a href="https://installmentsvfacr.com/">installments loans</a>
unsecured loan
<a href=https://installmentsvfacr.com/>personal installment loans</a> ’
by PamefloanoYJ (2017-09-29 07:24) 

お名前(必須)

home loans bad credit
<a href="https://paydayvynk.org/">cash advance</a>
3 month payday loans uk
<a href=https://paydayvynk.org/>payday loans online</a> ’
by お名前(必須) (2017-09-29 09:31) 

お名前(必須)

check into cash
<a href="https://personalvrdcg.org/">bad credit personal loans</a>
student loan debt relief
<a href=https://personalvrdcg.org/>apply personal loan</a> ’
by お名前(必須) (2017-09-29 11:04) 

お名前(必須)

a fast payday loan
<a href="https://personalloansntui.com">personal loans online</a>
instant loans
<a href=https://personalloansntui.com>quick personal loans</a> ’
by お名前(必須) (2017-10-01 07:39) 

お名前(必須)

get loans online
<a href="https://cashadvanceamericavatn.org">cash advance america</a>
payday loans bad credit
<a href=https://cashadvanceamericavatn.org>cash advance lenders</a> ’
by お名前(必須) (2017-10-01 19:11) 

お名前(必須)

cheapest cialis - http://cialisovnas.com/
cheap cialis brand name <a href=http://cialisovnas.com/>generic cialis</a> ’
by お名前(必須) (2017-10-03 07:34) 

お名前(必須)

bad credit loans andnot payday loan
<a href="https://paydayllae.com/">online payday loans</a>
instant approval personal loans
<a href=https://paydayllae.com/>payday loans</a> ’
by お名前(必須) (2017-10-03 23:40) 

JtnbJidilsRF

same day personal loans
<a href="https://paydayloamec.com/">payday loans</a>
actual payday loan companies
<a href=https://paydayloamec.com/>payday loans</a> ’
by JtnbJidilsRF (2017-10-04 00:16) 

お名前(必須)

what is a payday loan
<a href="https://paydayloanswwe.com/">instant payday loans</a>
get loan
<a href=https://paydayloanswwe.com/>payday cash loan</a> ’
by お名前(必須) (2017-10-04 00:42) 

お名前(必須)

direct lender payday loans
<a href="https://cashnowemr.com">payday loans bad credit</a>
direct online payday loans
<a href=https://cashnowemr.com>cash advance online</a> ’
by お名前(必須) (2017-10-04 01:29) 

お名前(必須)

easy loans no credit check
<a href="https://cashadmme.com/">payday loan</a>
100 guaranteed payday loan
<a href=https://cashadmme.com/>payday loan</a> ’
by お名前(必須) (2017-10-04 01:48) 

お名前(必須)

cash loans bad credit - https://paydayllae.com/
bank personal loan <a href=https://paydayllae.com/>fast payday loans</a> ’
by お名前(必須) (2017-10-05 07:30) 

FnrxmoiptAR

big payday loan company - https://paydayloamec.com/
army payday loans <a href=https://paydayloamec.com/>pay day loans</a> ’
by FnrxmoiptAR (2017-10-05 08:13) 

お名前(必須)

low interest rate personal loans - https://paydayloanswwe.com/
fresno ca <a href=https://paydayloanswwe.com/>payday loan</a> ’
by お名前(必須) (2017-10-05 08:39) 

お名前(必須)

fast cash - https://cashnowemr.com
personal loans people bad credit <a href=https://cashnowemr.com>payday cash loan</a> ’
by お名前(必須) (2017-10-05 09:06) 

お名前(必須)

1500 payday loan - https://cashadmme.com/
instant loans <a href=https://cashadmme.com/>payday cash loan</a> ’
by お名前(必須) (2017-10-05 09:30) 

FnveemoiptJU

installment loans poor credit - https://paydaybdrfs.com/
24 hour payday loans <a href=https://paydaybdrfs.com/>cash advance online</a> ’
by FnveemoiptJU (2017-10-07 00:06) 

お名前(必須)

bad credit car loan saving account payday loan student loan - https://cashecbya.com/
cash net <a href=https://cashecbya.com/>same day payday loans</a> ’
by お名前(必須) (2017-10-07 00:47) 

VtvzvdFeeRVW

cialis samples free - https://genonlinecialis.com
cialis low dose <a href=https://genonlinecialis.com>cialis buy</a> ’
by VtvzvdFeeRVW (2017-10-07 06:28) 

お名前(必須)

cialis over the counter - https://cheapcheapcialis.com/
cheap cialis soft <a href=https://cheapcheapcialis.com/>buy cialis</a> ’
by お名前(必須) (2017-10-07 08:38) 

お名前(必須)

best place to buy cialis - https://buybuybuycialis.com/
cialis 50 <a href=https://buybuybuycialis.com/>buy cialis</a> ’
by お名前(必須) (2017-10-07 10:54) 

お名前(必須)

cialis canadian
<a href="https://onlineonlinecialis.com/">cialis online</a>
generic soft cialis
<a href=https://onlineonlinecialis.com/>cialis online</a> ’
by お名前(必須) (2017-10-08 06:46) 

JtnvbJidilsIY

get payday loan
<a href="https://paydaybdrfs.com/">payday loans online</a>
a quick payday loan
<a href=https://paydaybdrfs.com/>cash advance</a> ’
by JtnvbJidilsIY (2017-10-08 07:45) 

お名前(必須)

america payday loan
<a href="https://cashecbya.com/">payday day loans</a>
auto loans bad credit
<a href=https://cashecbya.com/>payday day loans</a> ’
by お名前(必須) (2017-10-08 08:11) 

お名前(必須)

an instant payday loan
<a href="https://cashcevth.com">payday loan lenders</a>
guaranteed payday loans direct lenders
<a href=https://cashcevth.com>payday loans</a> ’
by お名前(必須) (2017-10-08 08:40) 

お名前(必須)

same day personal loans
<a href="https://paydayloansrvhj.com/">payday loan</a>
debt reduction services
<a href=https://paydayloansrvhj.com/>online payday loan</a> ’
by お名前(必須) (2017-10-08 09:03) 

お名前(必須)

order cialis without prescription - http://buycialis-menedpil.com/
generic cialis from india <a href="http://buycialis-menedpil.com/">cialis online</a> ’
by お名前(必須) (2017-10-11 04:41) 

お名前(必須)

order generic cialis - http://cialisonline-vipmej.com/
cialis 20 mg daily <a href=http://cialisonline-vipmej.com/>online cialis</a> ’
by お名前(必須) (2017-10-11 05:53) 

お名前(必須)

cialis directions - http://cialisonline-pricepil.com/
cialis pro <a href=http://cialisonline-pricepil.com/>buying cialis</a> ’
by お名前(必須) (2017-10-11 06:47) 

お名前(必須)

cialis 10mg tablets - http://onlinecialis-cialisvip.com
cialis 20 mg side effects <a href=http://onlinecialis-cialisvip.com>buy generic cialis</a> ’
by お名前(必須) (2017-10-11 06:59) 

AqrhdAccurlDI

cialis order canada - http://genericcialis-viaed.com/
cialis order <a href=http://genericcialis-viaed.com/>generic cialis</a> ’
by AqrhdAccurlDI (2017-10-11 12:18) 

お名前(必須)

generic cialis soft
<a href="http://buycialis-menedpil.com/">cialis online</a>
tadalafil generic cialis
<a href="http://buycialis-menedpil.com/">cialis</a>
by お名前(必須) (2017-10-12 07:35) 

お名前(必須)

cialis professional review
<a href="http://cialisonline-vipmej.com/">cialis reviews</a>
cialis shipped to canada
<a href=http://cialisonline-vipmej.com/>buy generic cialis</a> ’
by お名前(必須) (2017-10-12 08:25) 

お名前(必須)

branded cialis drugstore
<a href="http://cialisonline-pricepil.com/">generic cialis</a>
cialis dosing
<a href=http://cialisonline-pricepil.com/>generic cialis online</a> ’
by お名前(必須) (2017-10-12 09:16) 

お名前(必須)

ordering cialis online
<a href="http://onlinecialis-cialisvip.com">cheap cialis</a>
overnight cialis delivery
<a href=http://onlinecialis-cialisvip.com>cialis reviews</a> ’
by お名前(必須) (2017-10-12 09:29) 

KmrcnmoiptDE

installments loans - https://paydaycnrs.net/
advances <a href=https://paydaycnrs.net/>payday loans online</a> ’
by KmrcnmoiptDE (2017-10-18 04:02) 

お名前(必須)

payday loans bad credit - https://loanenav.net/
payday loans online same day <a href=https://loanenav.net/>fast payday loan</a> ’
by お名前(必須) (2017-10-18 05:28) 

SecvvelenueZO

24 hour payday loans online - https://loansczne.com/
credit loans <a href=https://loansczne.com/>online payday loans</a> ’
by SecvvelenueZO (2017-10-18 10:32) 

お名前(必須)

debt consolidation help - https://loans24rjn.com/
no hassle payday loans <a href=https://loans24rjn.com/>cash advance definition</a> ’
by お名前(必須) (2017-10-18 14:33) 

お名前(必須)

cant get a payday loan - https://loansnzyr.com/
bad credit loan <a href=https://loansnzyr.com/>payday loans online</a> ’
by お名前(必須) (2017-10-18 14:58) 

お名前(必須)

a payday loan lender - https://loanscerj.com/
cash advance loan <a href=https://loanscerj.com/>payday loans online</a> ’
by お名前(必須) (2017-10-18 22:10) 

お名前(必須)

quick personal loans bad credit
<a href="https://paydayobns.com/">bad credit payday loans</a>
installment loans no credit check
<a href="https://paydayobns.com/">payday loans online</a> ’
by お名前(必須) (2017-10-19 06:39) 

お名前(必須)

fast payday loans online
<a href="https://paydayceinf.org/">same day payday loan</a>
500 cash payday loan
<a href=https://paydayceinf.org/>same day payday loans</a> ’
by お名前(必須) (2017-10-19 06:39) 

お名前(必須)

car loan bad credit
<a href="https://loanenav.net/">payday loans online</a>
online payday loans with
<a href=https://loanenav.net/>payday loans online</a> ’
by お名前(必須) (2017-10-19 18:03) 

お名前(必須)

no credit check payday loans
<a href="https://loansnerc.org/">payday loans online</a>
payday day loans
<a href=https://loansnerc.org/>fast payday loan</a> ’
by お名前(必須) (2017-10-20 14:59) 

コメントを書く

お名前:
URL:
コメント:
画像認証:
下の画像に表示されている文字を入力してください。

トラックバック 0

この広告は前回の更新から一定期間経過したブログに表示されています。更新すると自動で解除されます。