DokuWiki

It's better when it's simple

ユーザ用ツール

サイト用ツール


ja:plugin:commentsyntax

コメント構文プラグイン

互換性のある DokuWiki バージョン

Ponder Stibbons

plugin DokuWiki 用のコメント構文

最終更新日
2014-09-01
種類
Syntax
リポジトリ
ソース

この拡張は二年以上更新されていません。もはや維持管理や対応がされておらず、互換性に問題がある可能性があります。

This extension is not in the 'plugin' or 'template' namespace and is therefore ignored.

類似 comment, commentsrc, wrap

タグ !experimental, comment

インストール

拡張機能管理プラグイン管理と最新バージョンがリンクされた上記のダンロード URL を使ってプラグインをインストールして下さい。 プラグインのインストール方法を参照して下さい。

概要

コメント構文プラグインは、DokuWiki に CSS っぽいコメント構文を導入します。 コメントはページ編集時には表示されますが、ページ上には表示されません。

コメントはWiki のソーステキストを説明するために使用します。 将来、特に複雑なマークアップを使用しているソースを再編集する場合に役立つでしょう。 ソーステキストから HTML に変換する際に、コメントは無視されます。

例と使用方法

'C' 形式コメントは /* で始まり */ で終わります。 コメント開始のマークアップ /* は、行頭か空白文字の後でなければなりません。 複数行にまたがるコメントもできます:

/* This is a comment */
/* This is 
a multi-line
comment */

コメント構文モードは、リストブロックモードより優先されます。 リスト構造を壊すことなく、リストの要素をコメントアウトできます。

  - item 1 /* A white space is necessary before comment-start markup */
/*- item 2    will be eliminated from this list without breaking it */
  - item 3 /* will be numbered as 2 in the list */ 
  1. item 1
  2. item 3

'C' 形式コメントは最初に遭遇した */ で終わることに注意してください。 入れ子になったコメントを正しく処理することを期待する場合、動作を設定変更することができます。 use_cstyle_nest オプションを有効にすれば、一番外側の /**/ で囲まれた全体をコメントとして認識します(デフォルト off):

/* There is an another comment /* in this comment */ (nested comment)*/

use_oneline_style オプションを有効にすれば「一行」コメント構文も有効にできます(デフォルト off)。

  * non-ordered list item // comment 
  • non-ordered list item
  - item 1 // A white space is necessary before One-line comment markup
//- item 2    will be eliminated from this list without breaking it
  - item 3 // will be numbered as 2 in the list
  1. item 1
  2. item 3

設定

設定項目 説明
toolbar_button ツールバーにコメント化ボタンを表示する toolbar icon (デフォルト off)
use_cstyle_nest 入れ子の C-style コメント記法を使用する(デフォルト off)
use_oneline_style 1行コメント記法を使用する(デフォルト off)

開発

github リポジトリの変更履歴

TODO と要望一覧

FAQ

類似プラグインの構文パターン差異

プラグイン名 mode type 正規表現
comment substition special pattern ^/\*.*?\*|\s+/\*.*?\*/
commentsrc substition special pattern !-.*-!
commentsyntax protected entry pattern \s/\*(?=.*?\*/)
exit pattern \*/
substition special pattern \s//(?:[^/\n]*|[^/\n]*/[^/\n]*)(?=\n)

既知のバグと問題

議論

ja/plugin/commentsyntax.txt · 最終更新: 2014-09-22 10:07 by s.sahara

特に明示されていない限り、本Wikiの内容は次のライセンスに従います: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki