コメント構文プラグイン
この拡張は二年以上更新されていません。もはや維持管理や対応がされておらず、互換性に問題がある可能性があります。
This extension is not in the 'plugin' or 'template' namespace and is therefore ignored.
類似 comment, commentsrc, wrap
インストール
拡張機能管理かプラグイン管理と最新バージョンがリンクされた上記のダンロード 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 */
- item 1
- 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
- item 1
- item 3
設定
開発
github リポジトリの変更履歴
- Merge pull request #11 from e-dschungel/e-dschungel-email-patch (2023-04-13 12:34)
- remove "<" and ">" (2023-03-11 11:40)
- update version date (2022-01-01 01:58)
- use __CLASS__ instead of get_class() (2021-12-09 04:51)
- add unittest (2021-12-07 14:28)
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) |