またひたすらにWikiForme

パーサ部分以外のところを全部書き直した。文章構造のロード、シンタックスシュガーのロードとか。例外処理強化。


プラグイン構造は、結局↓こんな感じで。

article.4me/
article.4me/base-devel
article.4me/base-devel/structure.yaml
article.4me/base-devel/xhtml
article.4me/base-devel/xhtml/test.rb
article.4me/base-devel/xhtml/subdir/
article.4me/base-devel/xhtml/subdir/override.rb
article.4me/base-devel/xhtml/subdir/override.png
article.4me/user/frsyuki
article.4me/user/frsyuki/structure.yaml
article.4me/user/frsyuki/xhtml
article.4me/user/frsyuki/xhtml/myelem.rb



まず.4meディレクトリを再帰的に潜っていって、structure.yamlファイルを探す。

structure.yamlと同じ階層にあるxhtmlディレクトリを再帰的に潜っていって、*.rbファイルをロード。

.rbファイルをロードするときは、その.rbファイルと同じ階層にchdirしてからロードする。


chdirするので、固定の画像ファイルを埋め込みたい、なんてときもOK。カレントディレクトリから読み込めばいい。