このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
dokuwiki:plugin:code2 [2014/10/11 03:23] – [対応方法] matsui | dokuwiki:plugin:code2 [2015/10/07 00:31] (現在) – 外部編集 127.0.0.1 | ||
---|---|---|---|
行 1: | 行 1: | ||
+ | ====== code2 ====== | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | <code lang 123 |[fh] text |[sh] aaa> | ||
+ | {code to highlight} | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | some text | ||
+ | </ | ||
+ | just marks up ”some text” as preformatted text (w/o any special highlighting). | ||
+ | <code 7> | ||
+ | some text | ||
+ | some text2 | ||
+ | </ | ||
+ | marks up ”some text” as preformatted text (w/o any special highlighting) with line numbers starting at number 7. | ||
+ | |||
+ | <code |A description> | ||
+ | some text | ||
+ | </ | ||
+ | marks up ”some text” as preformatted text (w/o any special highlighting) with a footer line of ”A description”. | ||
+ | |||
+ | <code html> | ||
+ | some text | ||
+ | </ | ||
+ | turns on HTML highlighting for ”some text”. | ||
+ | |||
+ | <code html 1> | ||
+ | some text | ||
+ | </ | ||
+ | turns on HTML highlighting for ”some text” with added line numbers starting with number 1. | ||
+ | |||
+ | <code html |h A description:> | ||
+ | some text | ||
+ | </ | ||
+ | turns on HTML highlighting for ”some text” and a header line of ”A description: | ||
+ | |||
+ | <code html 66 |A description> | ||
+ | some text | ||
+ | </ | ||
+ | turns on HTML highlighting for ”some text” with added line numbers starting with number 66 and a footer line of ”A description”. | ||
+ | |||
+ | <code diff> | ||
+ | some text | ||
+ | </ | ||
+ | turns on diff highlighting (autodetecting the patch format). | ||
+ | |||
+ | <code diff u> | ||
+ | some text | ||
+ | </ | ||
+ | turns on diff highlighting (assuming an unified patch format). | ||
+ | |||
+ | <code diff c |A description> | ||
+ | some text | ||
+ | </ | ||
+ | turns on diff highlighting (assuming a context patch format) and a footer line of ”A description”. | ||
+ | |||
+ | <code console 1|The shell output> | ||
+ | some console commands capture | ||
+ | </ | ||
+ | turns on console mode with a footer line of ”The shell output”. | ||
+ | |||
+ | |||
+ | <code html 1|t The example page:> | ||
+ | extern> http:// | ||
+ | </ | ||
+ | |||
+ | |||
+ | < | ||
+ | some text | ||
+ | and more | ||
+ | </ | ||
+ | |||
+ | <code 1> | ||
+ | some text | ||
+ | and more | ||
+ | </ | ||
+ | |||
+ | <code JavaScript 12|Listing 2> | ||
+ | var de = function() { | ||
+ | return (typeof(window.de) == ' | ||
+ | }(); | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== エラー ===== | ||
+ | |||
+ | プラグインをインストールすると、plugin.info.txtが存在しないのでエラーが出力されます。 | ||
+ | |||
+ | * 2014-09-29a " | ||
+ | |||
+ | < | ||
+ | Plugin name ' | ||
+ | </ | ||
+ | |||
+ | ==== 対応方法 ==== | ||
+ | |||
+ | 1.プラグイン名が、DOKU_PLUGIN_NAME_REGEX に引っかかるので、プラグイン名変更 | ||
+ | <code |h inc/ | ||
+ | 102 } elseif (preg_match('/ | ||
+ | 103 | ||
+ | 104 ' | ||
+ | </ | ||
+ | |||
+ | <code console> | ||
+ | $ mv lib/ | ||
+ | </ | ||
+ | |||
+ | 2.別なプラグインからplugin.info.txtをコピーして、適当に書き換える。 | ||
+ | <code console> | ||
+ | $ cp lib/ | ||
+ | $ vi lib/ | ||
+ | base | ||
+ | author | ||
+ | email XXXX@XXX | ||
+ | date | ||
+ | name code2 Plugin | ||
+ | </ | ||
+ | |||
+ | {{tag> | ||