qwik2md 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.travis.yml +4 -0
- data/Gemfile +4 -0
- data/README.md +36 -0
- data/Rakefile +10 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/exe/qwik2md +17 -0
- data/lib/qwik2md/version.rb +3 -0
- data/lib/qwik2md.rb +39 -0
- data/qwik2md.gemspec +30 -0
- data/vendor/qwik/AUTHORS +10 -0
- data/vendor/qwik/COPYING +340 -0
- data/vendor/qwik/COPYRIGHT +346 -0
- data/vendor/qwik/lib/qwik/Makefile +63 -0
- data/vendor/qwik/lib/qwik/Rakefile +17 -0
- data/vendor/qwik/lib/qwik/act-aa.rb +83 -0
- data/vendor/qwik/lib/qwik/act-archive.rb +386 -0
- data/vendor/qwik/lib/qwik/act-attach.rb +304 -0
- data/vendor/qwik/lib/qwik/act-backup.rb +236 -0
- data/vendor/qwik/lib/qwik/act-basic.rb +325 -0
- data/vendor/qwik/lib/qwik/act-book.rb +161 -0
- data/vendor/qwik/lib/qwik/act-calc.rb +371 -0
- data/vendor/qwik/lib/qwik/act-charset.rb +251 -0
- data/vendor/qwik/lib/qwik/act-christel.rb +112 -0
- data/vendor/qwik/lib/qwik/act-chronology.rb +149 -0
- data/vendor/qwik/lib/qwik/act-code.rb +155 -0
- data/vendor/qwik/lib/qwik/act-comment.rb +554 -0
- data/vendor/qwik/lib/qwik/act-config.rb +49 -0
- data/vendor/qwik/lib/qwik/act-counter.rb +125 -0
- data/vendor/qwik/lib/qwik/act-day.rb +96 -0
- data/vendor/qwik/lib/qwik/act-describe.rb +135 -0
- data/vendor/qwik/lib/qwik/act-diary.rb +109 -0
- data/vendor/qwik/lib/qwik/act-edit.rb +317 -0
- data/vendor/qwik/lib/qwik/act-embed-html.rb +296 -0
- data/vendor/qwik/lib/qwik/act-emode.rb +150 -0
- data/vendor/qwik/lib/qwik/act-event.rb +187 -0
- data/vendor/qwik/lib/qwik/act-file.rb +303 -0
- data/vendor/qwik/lib/qwik/act-files.rb +771 -0
- data/vendor/qwik/lib/qwik/act-getpass.rb +295 -0
- data/vendor/qwik/lib/qwik/act-history.rb +136 -0
- data/vendor/qwik/lib/qwik/act-html.rb +204 -0
- data/vendor/qwik/lib/qwik/act-httpauth.rb +147 -0
- data/vendor/qwik/lib/qwik/act-include.rb +142 -0
- data/vendor/qwik/lib/qwik/act-interwiki.rb +189 -0
- data/vendor/qwik/lib/qwik/act-isearch.rb +109 -0
- data/vendor/qwik/lib/qwik/act-keywords.rb +137 -0
- data/vendor/qwik/lib/qwik/act-lang.rb +81 -0
- data/vendor/qwik/lib/qwik/act-license.rb +63 -0
- data/vendor/qwik/lib/qwik/act-list.rb +287 -0
- data/vendor/qwik/lib/qwik/act-login.rb +410 -0
- data/vendor/qwik/lib/qwik/act-logout.rb +60 -0
- data/vendor/qwik/lib/qwik/act-mail.rb +159 -0
- data/vendor/qwik/lib/qwik/act-map.rb +292 -0
- data/vendor/qwik/lib/qwik/act-md5.rb +42 -0
- data/vendor/qwik/lib/qwik/act-mdlb.rb +741 -0
- data/vendor/qwik/lib/qwik/act-media.rb +416 -0
- data/vendor/qwik/lib/qwik/act-member.rb +157 -0
- data/vendor/qwik/lib/qwik/act-menu.rb +142 -0
- data/vendor/qwik/lib/qwik/act-metadata.rb +323 -0
- data/vendor/qwik/lib/qwik/act-mlsubmitform.rb +49 -0
- data/vendor/qwik/lib/qwik/act-monitor.rb +167 -0
- data/vendor/qwik/lib/qwik/act-new.rb +418 -0
- data/vendor/qwik/lib/qwik/act-pagelist.rb +248 -0
- data/vendor/qwik/lib/qwik/act-password.rb +145 -0
- data/vendor/qwik/lib/qwik/act-plan.rb +210 -0
- data/vendor/qwik/lib/qwik/act-povray.rb +230 -0
- data/vendor/qwik/lib/qwik/act-presen.rb +380 -0
- data/vendor/qwik/lib/qwik/act-redirect.rb +133 -0
- data/vendor/qwik/lib/qwik/act-ring.rb +1071 -0
- data/vendor/qwik/lib/qwik/act-rrefs.rb +255 -0
- data/vendor/qwik/lib/qwik/act-ruby.rb +116 -0
- data/vendor/qwik/lib/qwik/act-sample.rb +170 -0
- data/vendor/qwik/lib/qwik/act-save.rb +295 -0
- data/vendor/qwik/lib/qwik/act-schedule.rb +374 -0
- data/vendor/qwik/lib/qwik/act-search.rb +180 -0
- data/vendor/qwik/lib/qwik/act-searchwords.rb +51 -0
- data/vendor/qwik/lib/qwik/act-sendpass.rb +83 -0
- data/vendor/qwik/lib/qwik/act-site.rb +89 -0
- data/vendor/qwik/lib/qwik/act-sitebackup.rb +419 -0
- data/vendor/qwik/lib/qwik/act-sitelog.rb +118 -0
- data/vendor/qwik/lib/qwik/act-smil.rb +299 -0
- data/vendor/qwik/lib/qwik/act-status.rb +220 -0
- data/vendor/qwik/lib/qwik/act-style.rb +608 -0
- data/vendor/qwik/lib/qwik/act-table.rb +263 -0
- data/vendor/qwik/lib/qwik/act-tableform.rb +241 -0
- data/vendor/qwik/lib/qwik/act-tag.rb +103 -0
- data/vendor/qwik/lib/qwik/act-text.rb +70 -0
- data/vendor/qwik/lib/qwik/act-textarea.rb +164 -0
- data/vendor/qwik/lib/qwik/act-theme.rb +346 -0
- data/vendor/qwik/lib/qwik/act-toc.rb +112 -0
- data/vendor/qwik/lib/qwik/act-typekey.rb +198 -0
- data/vendor/qwik/lib/qwik/act-under-const.rb +94 -0
- data/vendor/qwik/lib/qwik/act-webservice.rb +321 -0
- data/vendor/qwik/lib/qwik/act-wema.rb +558 -0
- data/vendor/qwik/lib/qwik/act-wysiwyg.rb +238 -0
- data/vendor/qwik/lib/qwik/action.rb +325 -0
- data/vendor/qwik/lib/qwik/autoreload.rb +98 -0
- data/vendor/qwik/lib/qwik/bench-bench.rb +28 -0
- data/vendor/qwik/lib/qwik/bench-emode.rb +47 -0
- data/vendor/qwik/lib/qwik/bench-format-xml.rb +70 -0
- data/vendor/qwik/lib/qwik/bench-large-table.rb +62 -0
- data/vendor/qwik/lib/qwik/bench-md5.rb +14 -0
- data/vendor/qwik/lib/qwik/bench-module-session.rb +19 -0
- data/vendor/qwik/lib/qwik/bench-page.rb +50 -0
- data/vendor/qwik/lib/qwik/bench-s-md5.rb +28 -0
- data/vendor/qwik/lib/qwik/bench-session.rb +25 -0
- data/vendor/qwik/lib/qwik/bench-textformat.rb +31 -0
- data/vendor/qwik/lib/qwik/catalog-factory.rb +91 -0
- data/vendor/qwik/lib/qwik/catalog-ja.rb +479 -0
- data/vendor/qwik/lib/qwik/catalog-ml-ja.rb +145 -0
- data/vendor/qwik/lib/qwik/check-act-monitor.rb +112 -0
- data/vendor/qwik/lib/qwik/check-act-monitor2.rb +46 -0
- data/vendor/qwik/lib/qwik/check-act-theme.rb +27 -0
- data/vendor/qwik/lib/qwik/check-event.rb +112 -0
- data/vendor/qwik/lib/qwik/check-event2.rb +55 -0
- data/vendor/qwik/lib/qwik/check-htree-rexml.rb +77 -0
- data/vendor/qwik/lib/qwik/check-htree.rb +51 -0
- data/vendor/qwik/lib/qwik/check-libxml.rb +135 -0
- data/vendor/qwik/lib/qwik/check-many-pages.rb +47 -0
- data/vendor/qwik/lib/qwik/check-monitor.rb +33 -0
- data/vendor/qwik/lib/qwik/check-observer.rb +67 -0
- data/vendor/qwik/lib/qwik/check-server.rb +61 -0
- data/vendor/qwik/lib/qwik/check-uuencode.rb +33 -0
- data/vendor/qwik/lib/qwik/check-webdav.rb +65 -0
- data/vendor/qwik/lib/qwik/check-xml-xpath.rb +27 -0
- data/vendor/qwik/lib/qwik/common-backtrace.rb +94 -0
- data/vendor/qwik/lib/qwik/common-basic.rb +111 -0
- data/vendor/qwik/lib/qwik/common-condition.rb +142 -0
- data/vendor/qwik/lib/qwik/common-error.rb +48 -0
- data/vendor/qwik/lib/qwik/common-gettext.rb +50 -0
- data/vendor/qwik/lib/qwik/common-javascript.rb +45 -0
- data/vendor/qwik/lib/qwik/common-notice.rb +132 -0
- data/vendor/qwik/lib/qwik/common-plain.rb +105 -0
- data/vendor/qwik/lib/qwik/common-plugin.rb +111 -0
- data/vendor/qwik/lib/qwik/common-res.rb +76 -0
- data/vendor/qwik/lib/qwik/common-resolve.rb +92 -0
- data/vendor/qwik/lib/qwik/common-send.rb +171 -0
- data/vendor/qwik/lib/qwik/common-session.rb +139 -0
- data/vendor/qwik/lib/qwik/common-surface.rb +261 -0
- data/vendor/qwik/lib/qwik/common-url.rb +90 -0
- data/vendor/qwik/lib/qwik/compat/Makefile +12 -0
- data/vendor/qwik/lib/qwik/compat/add_load_path.rb +1 -0
- data/vendor/qwik/lib/qwik/config.rb +299 -0
- data/vendor/qwik/lib/qwik/db-b-backup.rb +142 -0
- data/vendor/qwik/lib/qwik/db-backup.rb +184 -0
- data/vendor/qwik/lib/qwik/db-berkeley.rb +306 -0
- data/vendor/qwik/lib/qwik/db-filesystem.rb +305 -0
- data/vendor/qwik/lib/qwik/db-indexer.rb +154 -0
- data/vendor/qwik/lib/qwik/db-searchwords.rb +238 -0
- data/vendor/qwik/lib/qwik/description-ja.rb +267 -0
- data/vendor/qwik/lib/qwik/description.rb +256 -0
- data/vendor/qwik/lib/qwik/dev-add-copyright.rb +23 -0
- data/vendor/qwik/lib/qwik/dev-backup.rb +24 -0
- data/vendor/qwik/lib/qwik/dev-bench.rb +175 -0
- data/vendor/qwik/lib/qwik/dev-calctime.rb +52 -0
- data/vendor/qwik/lib/qwik/dev-css-compressor.rb +60 -0
- data/vendor/qwik/lib/qwik/dev-extract-catalog.rb +102 -0
- data/vendor/qwik/lib/qwik/dev-js-compressor.rb +73 -0
- data/vendor/qwik/lib/qwik/dev-release.rb +235 -0
- data/vendor/qwik/lib/qwik/dev-replace.rb +353 -0
- data/vendor/qwik/lib/qwik/dev-sendmail.rb +25 -0
- data/vendor/qwik/lib/qwik/farm.rb +283 -0
- data/vendor/qwik/lib/qwik/gettext.rb +56 -0
- data/vendor/qwik/lib/qwik/group-cond.rb +157 -0
- data/vendor/qwik/lib/qwik/group-config.rb +247 -0
- data/vendor/qwik/lib/qwik/group-confirm.rb +147 -0
- data/vendor/qwik/lib/qwik/group-db.rb +326 -0
- data/vendor/qwik/lib/qwik/group-mail.rb +195 -0
- data/vendor/qwik/lib/qwik/group-member.rb +307 -0
- data/vendor/qwik/lib/qwik/group-sendmail.rb +231 -0
- data/vendor/qwik/lib/qwik/group-site.rb +374 -0
- data/vendor/qwik/lib/qwik/group-sweep.rb +63 -0
- data/vendor/qwik/lib/qwik/group.rb +157 -0
- data/vendor/qwik/lib/qwik/helper.rb +6 -0
- data/vendor/qwik/lib/qwik/html-generator.rb +104 -0
- data/vendor/qwik/lib/qwik/html-to-wabisabi.rb +148 -0
- data/vendor/qwik/lib/qwik/htree-diff.rb +87 -0
- data/vendor/qwik/lib/qwik/htree-format-xml.rb +57 -0
- data/vendor/qwik/lib/qwik/htree-generator.rb +144 -0
- data/vendor/qwik/lib/qwik/htree-get.rb +251 -0
- data/vendor/qwik/lib/qwik/htree-html-generator.rb +179 -0
- data/vendor/qwik/lib/qwik/htree-template.rb +263 -0
- data/vendor/qwik/lib/qwik/htree-to-wabisabi.rb +171 -0
- data/vendor/qwik/lib/qwik/loadlib.rb +79 -0
- data/vendor/qwik/lib/qwik/logger.rb +115 -0
- data/vendor/qwik/lib/qwik/mail-body.rb +171 -0
- data/vendor/qwik/lib/qwik/mail-header.rb +474 -0
- data/vendor/qwik/lib/qwik/mail-multipart.rb +193 -0
- data/vendor/qwik/lib/qwik/mail-parse.rb +147 -0
- data/vendor/qwik/lib/qwik/mail.rb +341 -0
- data/vendor/qwik/lib/qwik/mailaddress.rb +83 -0
- data/vendor/qwik/lib/qwik/mdlb-model.rb +81 -0
- data/vendor/qwik/lib/qwik/mdlb-sample.rb +324 -0
- data/vendor/qwik/lib/qwik/ml-catalog-factory.rb +27 -0
- data/vendor/qwik/lib/qwik/ml-exception.rb +15 -0
- data/vendor/qwik/lib/qwik/ml-generator.rb +28 -0
- data/vendor/qwik/lib/qwik/ml-gettext.rb +137 -0
- data/vendor/qwik/lib/qwik/ml-logger.rb +82 -0
- data/vendor/qwik/lib/qwik/ml-memory.rb +65 -0
- data/vendor/qwik/lib/qwik/ml-msg-validator.rb +86 -0
- data/vendor/qwik/lib/qwik/ml-processor.rb +609 -0
- data/vendor/qwik/lib/qwik/ml-quickml-server.rb +122 -0
- data/vendor/qwik/lib/qwik/ml-sendmail.rb +0 -0
- data/vendor/qwik/lib/qwik/ml-server.rb +107 -0
- data/vendor/qwik/lib/qwik/ml-session.rb +348 -0
- data/vendor/qwik/lib/qwik/ml-sweeper.rb +101 -0
- data/vendor/qwik/lib/qwik/mock-logger.rb +65 -0
- data/vendor/qwik/lib/qwik/mock-sendmail.rb +78 -0
- data/vendor/qwik/lib/qwik/mock-socket.rb +82 -0
- data/vendor/qwik/lib/qwik/modulobe.rb +406 -0
- data/vendor/qwik/lib/qwik/mongrel-server.rb +72 -0
- data/vendor/qwik/lib/qwik/page-files.rb +249 -0
- data/vendor/qwik/lib/qwik/page-generate.rb +82 -0
- data/vendor/qwik/lib/qwik/page-get.rb +262 -0
- data/vendor/qwik/lib/qwik/page-images.rb +168 -0
- data/vendor/qwik/lib/qwik/page-put.rb +128 -0
- data/vendor/qwik/lib/qwik/page-rrefs.rb +154 -0
- data/vendor/qwik/lib/qwik/page-title.rb +0 -0
- data/vendor/qwik/lib/qwik/page-wikidb.rb +234 -0
- data/vendor/qwik/lib/qwik/page.rb +67 -0
- data/vendor/qwik/lib/qwik/pages.rb +444 -0
- data/vendor/qwik/lib/qwik/parse-plugin.rb +249 -0
- data/vendor/qwik/lib/qwik/parser-emode.rb +116 -0
- data/vendor/qwik/lib/qwik/parser-inline.rb +272 -0
- data/vendor/qwik/lib/qwik/parser.rb +349 -0
- data/vendor/qwik/lib/qwik/password.rb +183 -0
- data/vendor/qwik/lib/qwik/periodic.rb +79 -0
- data/vendor/qwik/lib/qwik/qp.rb +56 -0
- data/vendor/qwik/lib/qwik/qwik-service.rb +341 -0
- data/vendor/qwik/lib/qwik/qwik.rb +5 -0
- data/vendor/qwik/lib/qwik/qwikweb-adduser.rb +34 -0
- data/vendor/qwik/lib/qwik/qwikweb-catalog-validator.rb +110 -0
- data/vendor/qwik/lib/qwik/qwikweb-incgen.rb +28 -0
- data/vendor/qwik/lib/qwik/qwikweb-makesite.rb +41 -0
- data/vendor/qwik/lib/qwik/qwikweb-server.rb +44 -0
- data/vendor/qwik/lib/qwik/qwikweb-showpassword.rb +26 -0
- data/vendor/qwik/lib/qwik/qwikweb-watchlog.rb +67 -0
- data/vendor/qwik/lib/qwik/request-path.rb +304 -0
- data/vendor/qwik/lib/qwik/request-ua.rb +76 -0
- data/vendor/qwik/lib/qwik/request-webrick.rb +81 -0
- data/vendor/qwik/lib/qwik/request.rb +91 -0
- data/vendor/qwik/lib/qwik/resolve-tdiary.rb +292 -0
- data/vendor/qwik/lib/qwik/resolve.rb +121 -0
- data/vendor/qwik/lib/qwik/response.rb +228 -0
- data/vendor/qwik/lib/qwik/server-memory.rb +57 -0
- data/vendor/qwik/lib/qwik/server-webrick.rb +102 -0
- data/vendor/qwik/lib/qwik/server.rb +252 -0
- data/vendor/qwik/lib/qwik/site-config.rb +149 -0
- data/vendor/qwik/lib/qwik/site-db.rb +136 -0
- data/vendor/qwik/lib/qwik/site-event.rb +162 -0
- data/vendor/qwik/lib/qwik/site-files.rb +86 -0
- data/vendor/qwik/lib/qwik/site-group.rb +103 -0
- data/vendor/qwik/lib/qwik/site-index.rb +47 -0
- data/vendor/qwik/lib/qwik/site-log.rb +64 -0
- data/vendor/qwik/lib/qwik/site-member.rb +230 -0
- data/vendor/qwik/lib/qwik/site-monitor.rb +97 -0
- data/vendor/qwik/lib/qwik/site-pages.rb +62 -0
- data/vendor/qwik/lib/qwik/site-plan.rb +139 -0
- data/vendor/qwik/lib/qwik/site-report.rb +282 -0
- data/vendor/qwik/lib/qwik/site-resolve.rb +230 -0
- data/vendor/qwik/lib/qwik/site-rrefs.rb +18 -0
- data/vendor/qwik/lib/qwik/site-search.rb +180 -0
- data/vendor/qwik/lib/qwik/site-timeline.rb +153 -0
- data/vendor/qwik/lib/qwik/site-url.rb +189 -0
- data/vendor/qwik/lib/qwik/site.rb +76 -0
- data/vendor/qwik/lib/qwik/smil-time.rb +105 -0
- data/vendor/qwik/lib/qwik/smtp-session.rb +331 -0
- data/vendor/qwik/lib/qwik/template-generator.rb +149 -0
- data/vendor/qwik/lib/qwik/template.rb +85 -0
- data/vendor/qwik/lib/qwik/test-common.rb +10 -0
- data/vendor/qwik/lib/qwik/test-ml-info.rb +225 -0
- data/vendor/qwik/lib/qwik/test-module-ml.rb +142 -0
- data/vendor/qwik/lib/qwik/test-module-path.rb +110 -0
- data/vendor/qwik/lib/qwik/test-module-public.rb +70 -0
- data/vendor/qwik/lib/qwik/test-module-server.rb +98 -0
- data/vendor/qwik/lib/qwik/test-module-session.rb +264 -0
- data/vendor/qwik/lib/qwik/test-module-suite.rb +91 -0
- data/vendor/qwik/lib/qwik/test-ms-applemail.rb +59 -0
- data/vendor/qwik/lib/qwik/test-ms-attach.rb +174 -0
- data/vendor/qwik/lib/qwik/test-ms-basic.rb +40 -0
- data/vendor/qwik/lib/qwik/test-ms-close.rb +35 -0
- data/vendor/qwik/lib/qwik/test-ms-confirm.rb +75 -0
- data/vendor/qwik/lib/qwik/test-ms-ignore-spam.rb +57 -0
- data/vendor/qwik/lib/qwik/test-ms-japanese.rb +97 -0
- data/vendor/qwik/lib/qwik/test-ms-jfilename.rb +82 -0
- data/vendor/qwik/lib/qwik/test-ms-large.rb +58 -0
- data/vendor/qwik/lib/qwik/test-ms-member.rb +103 -0
- data/vendor/qwik/lib/qwik/test-ms-multipart.rb +84 -0
- data/vendor/qwik/lib/qwik/test-ms-org.rb +129 -0
- data/vendor/qwik/lib/qwik/test-ms-plan.rb +130 -0
- data/vendor/qwik/lib/qwik/test-ms-post.rb +53 -0
- data/vendor/qwik/lib/qwik/test-ms-quopri.rb +76 -0
- data/vendor/qwik/lib/qwik/test-sub-quopri.rb +45 -0
- data/vendor/qwik/lib/qwik/test-submit-base64.rb +59 -0
- data/vendor/qwik/lib/qwik/test-submit-forward.rb +61 -0
- data/vendor/qwik/lib/qwik/test-submit-html-mail.rb +52 -0
- data/vendor/qwik/lib/qwik/test-submit-japanese.rb +135 -0
- data/vendor/qwik/lib/qwik/test-submit-jfilename.rb +144 -0
- data/vendor/qwik/lib/qwik/test-submit-uuencode.rb +71 -0
- data/vendor/qwik/lib/qwik/test-suite-all.rb +8 -0
- data/vendor/qwik/lib/qwik/test-suite-basic.rb +9 -0
- data/vendor/qwik/lib/qwik/test-suite-ml.rb +9 -0
- data/vendor/qwik/lib/qwik/test-typekey.rb +64 -0
- data/vendor/qwik/lib/qwik/testunit.rb +45 -0
- data/vendor/qwik/lib/qwik/tokenizer-inline.rb +288 -0
- data/vendor/qwik/lib/qwik/tokenizer.rb +331 -0
- data/vendor/qwik/lib/qwik/typekey.rb +160 -0
- data/vendor/qwik/lib/qwik/util-basic.rb +135 -0
- data/vendor/qwik/lib/qwik/util-charset.rb +331 -0
- data/vendor/qwik/lib/qwik/util-css.rb +56 -0
- data/vendor/qwik/lib/qwik/util-csv-tokenizer.rb +113 -0
- data/vendor/qwik/lib/qwik/util-filename.rb +112 -0
- data/vendor/qwik/lib/qwik/util-pathname.rb +202 -0
- data/vendor/qwik/lib/qwik/util-pid.rb +58 -0
- data/vendor/qwik/lib/qwik/util-safe.rb +67 -0
- data/vendor/qwik/lib/qwik/util-sendmail.rb +273 -0
- data/vendor/qwik/lib/qwik/util-string.rb +202 -0
- data/vendor/qwik/lib/qwik/util-time.rb +125 -0
- data/vendor/qwik/lib/qwik/util-webrick.rb +176 -0
- data/vendor/qwik/lib/qwik/version.rb +11 -0
- data/vendor/qwik/lib/qwik/wabisabi-basic.rb +163 -0
- data/vendor/qwik/lib/qwik/wabisabi-diff.rb +130 -0
- data/vendor/qwik/lib/qwik/wabisabi-format-xml.rb +310 -0
- data/vendor/qwik/lib/qwik/wabisabi-generator.rb +262 -0
- data/vendor/qwik/lib/qwik/wabisabi-index.rb +174 -0
- data/vendor/qwik/lib/qwik/wabisabi-table.rb +212 -0
- data/vendor/qwik/lib/qwik/wabisabi-template.rb +295 -0
- data/vendor/qwik/lib/qwik/wabisabi-to-htree.rb +111 -0
- data/vendor/qwik/lib/qwik/wabisabi-to-wiki.rb +690 -0
- data/vendor/qwik/lib/qwik/wabisabi-traverse.rb +207 -0
- data/vendor/qwik/lib/qwik/wabisabi-validator.rb +116 -0
- data/vendor/qwik/lib/qwik/wabisabi.rb +5 -0
- metadata +492 -0
@@ -0,0 +1,249 @@
|
|
1
|
+
# Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
|
2
|
+
# This is free software with ABSOLUTELY NO WARRANTY.
|
3
|
+
# You can redistribute it and/or modify it under the terms of the GNU GPL 2.
|
4
|
+
|
5
|
+
require 'fileutils'
|
6
|
+
|
7
|
+
$LOAD_PATH.unshift '..' unless $LOAD_PATH.include? '..'
|
8
|
+
require 'qwik/util-pathname'
|
9
|
+
require 'qwik/page-images'
|
10
|
+
require 'qwik/util-filename'
|
11
|
+
|
12
|
+
module Qwik
|
13
|
+
class AlreadyExist < StandardError; end
|
14
|
+
class CanNotUseJapaneseCharacter < StandardError; end
|
15
|
+
class FileNotExist < StandardError; end
|
16
|
+
class FailedToDelete < StandardError; end
|
17
|
+
class CanNotAccessParentDirectory < StandardError; end
|
18
|
+
|
19
|
+
module AttachModule
|
20
|
+
# FIXME: AttachModule#path should be private.
|
21
|
+
def path(filename)
|
22
|
+
@attach_path.check_directory
|
23
|
+
return @attach_path + Filename.encode(filename)
|
24
|
+
end
|
25
|
+
|
26
|
+
def exist?(filename)
|
27
|
+
return path(filename).exist?
|
28
|
+
end
|
29
|
+
|
30
|
+
def get(filename)
|
31
|
+
return path(filename).read
|
32
|
+
end
|
33
|
+
|
34
|
+
def overwrite(filename, content)
|
35
|
+
put(filename, content, true)
|
36
|
+
end
|
37
|
+
|
38
|
+
def put(filename, content, overwrite=nil, time=nil)
|
39
|
+
raise AlreadyExist if ! overwrite && exist?(filename)
|
40
|
+
|
41
|
+
put_internal(filename, content, time)
|
42
|
+
|
43
|
+
return nil
|
44
|
+
end
|
45
|
+
|
46
|
+
def total
|
47
|
+
t = 0
|
48
|
+
self.each {|f|
|
49
|
+
s = self.path(f).size?
|
50
|
+
t += s if s
|
51
|
+
}
|
52
|
+
return t
|
53
|
+
end
|
54
|
+
|
55
|
+
def fput(filename, content, overwrite=nil, time=nil) # obsolete
|
56
|
+
# overwrite is always ignored.
|
57
|
+
res = filename
|
58
|
+
if exist?(filename)
|
59
|
+
res, num = search_unused {|num| another_file(num, filename) }
|
60
|
+
end
|
61
|
+
|
62
|
+
put_internal(res, content, time)
|
63
|
+
|
64
|
+
return res # Return result.
|
65
|
+
end
|
66
|
+
|
67
|
+
def another_file(num, filename)
|
68
|
+
return "#{num}-#{filename}" # '1-t.txt'
|
69
|
+
end
|
70
|
+
|
71
|
+
DEFAULT_BACKUP = false
|
72
|
+
def delete(filename, backup = DEFAULT_BACKUP)
|
73
|
+
fpath = path(filename)
|
74
|
+
raise FileNotExist if ! fpath.exist?
|
75
|
+
|
76
|
+
if backup # Move to backup.
|
77
|
+
dirpath = fpath.dirname
|
78
|
+
basepath = fpath.basename
|
79
|
+
moveto_basepath = ".._#{Time.now.to_i}_"+basepath
|
80
|
+
moveto_path = dirpath + moveto_basepath
|
81
|
+
FileUtils.mv(fpath.to_s, moveto_path.to_s)
|
82
|
+
else
|
83
|
+
fpath.unlink # Real unilnk.
|
84
|
+
end
|
85
|
+
|
86
|
+
raise FailedToDelete if exist?(filename)
|
87
|
+
|
88
|
+
return nil
|
89
|
+
end
|
90
|
+
|
91
|
+
def list
|
92
|
+
return [] unless @attach_path.directory?
|
93
|
+
ar = []
|
94
|
+
@attach_path.each_entry {|file|
|
95
|
+
next if file.directory?
|
96
|
+
next if file.to_s == 'CVS'
|
97
|
+
next if /\A\./ =~ file.to_s
|
98
|
+
ar << Filename.decode(file.to_s)
|
99
|
+
}
|
100
|
+
return ar.sort!
|
101
|
+
end
|
102
|
+
|
103
|
+
def each
|
104
|
+
return unless @attach_path.directory?
|
105
|
+
self.list.each {|a|
|
106
|
+
yield(a)
|
107
|
+
}
|
108
|
+
end
|
109
|
+
|
110
|
+
private
|
111
|
+
|
112
|
+
def put_internal(filename, content, time=nil)
|
113
|
+
path(filename).put(content)
|
114
|
+
set_time(filename, time) if time
|
115
|
+
end
|
116
|
+
|
117
|
+
def set_time(filename, time)
|
118
|
+
time = Time.at(time) if time.is_a?(Integer)
|
119
|
+
path(filename).utime(time, time)
|
120
|
+
end
|
121
|
+
|
122
|
+
MAX = 1000
|
123
|
+
def search_unused
|
124
|
+
(1..MAX).each {|num|
|
125
|
+
f = yield(num)
|
126
|
+
return f, num if ! exist?(f)
|
127
|
+
}
|
128
|
+
raise 'MAX Exceed.'
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
class PageFiles
|
133
|
+
include Enumerable
|
134
|
+
include AttachModule
|
135
|
+
|
136
|
+
def initialize(site_dir, key)
|
137
|
+
@attach_path = site_dir.path+"#{key}.files"
|
138
|
+
end
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
if $0 == __FILE__
|
143
|
+
require 'qwik/testunit'
|
144
|
+
require 'qwik/test-module-path'
|
145
|
+
$test = true
|
146
|
+
end
|
147
|
+
|
148
|
+
if defined?($test) && $test
|
149
|
+
require 'qwik/test-module-public'
|
150
|
+
|
151
|
+
class TestPageFiles < Test::Unit::TestCase
|
152
|
+
include TestModulePublic
|
153
|
+
|
154
|
+
def setup_files
|
155
|
+
dir = '.test/'.path
|
156
|
+
dir.setup
|
157
|
+
files = Qwik::PageFiles.new(dir.to_s, '1')
|
158
|
+
|
159
|
+
d = dir+'.attach'
|
160
|
+
d.teardown if d.exist?
|
161
|
+
|
162
|
+
return [dir, files]
|
163
|
+
end
|
164
|
+
|
165
|
+
def teardown_files(dir)
|
166
|
+
dir.teardown
|
167
|
+
end
|
168
|
+
|
169
|
+
def test_page_attach
|
170
|
+
dir, files = setup_files
|
171
|
+
|
172
|
+
# test_not_exist
|
173
|
+
ok_eq(false, files.exist?('t.txt'))
|
174
|
+
|
175
|
+
# test_put
|
176
|
+
files.fput('t.txt', 't')
|
177
|
+
ok_eq(true, files.exist?('t.txt'))
|
178
|
+
|
179
|
+
# test_load_file
|
180
|
+
# FIXME: The path should not be accesible.
|
181
|
+
# path = files.path('t.txt')
|
182
|
+
# ok_eq('./test/1.files/t.txt', path.to_s)
|
183
|
+
# ok_eq('t', path.get)
|
184
|
+
|
185
|
+
# test_get
|
186
|
+
ok_eq('t', files.get('t.txt'))
|
187
|
+
|
188
|
+
# test_list
|
189
|
+
ok_eq(['t.txt'], files.list)
|
190
|
+
|
191
|
+
# test_each
|
192
|
+
files.each {|f|
|
193
|
+
ok_eq('t.txt', f) # Only one file here.
|
194
|
+
}
|
195
|
+
|
196
|
+
# test_delete
|
197
|
+
files.delete('t.txt')
|
198
|
+
ok_eq(false, files.exist?('t.txt'))
|
199
|
+
|
200
|
+
# test_security
|
201
|
+
# path = files.path('t/t.txt') # ok
|
202
|
+
# assert_raise(Qwik::CanNotAccessParentDirectory) {
|
203
|
+
# path = files.path('../t.txt') # bad
|
204
|
+
# }
|
205
|
+
|
206
|
+
teardown_files(dir)
|
207
|
+
end
|
208
|
+
|
209
|
+
def test_fput
|
210
|
+
dir, files = setup_files
|
211
|
+
|
212
|
+
# test_with_japanese_filename
|
213
|
+
files.fput("\202\240.txt", 't')
|
214
|
+
ok_eq(["\343\201\202.txt"], files.list)
|
215
|
+
ok_eq(true, files.exist?("\202\240.txt"))
|
216
|
+
|
217
|
+
# test_with_japanese_filename_twice
|
218
|
+
files.fput("\202\240.txt", 't2') # with same name.
|
219
|
+
ok_eq(["1-\343\201\202.txt", "\343\201\202.txt"], files.list)
|
220
|
+
ok_eq(true, files.exist?("1-\202\240.txt"))
|
221
|
+
|
222
|
+
files.delete("\202\240.txt")
|
223
|
+
ok_eq(false, files.exist?("\202\240.txt"))
|
224
|
+
files.delete("1-\202\240.txt")
|
225
|
+
ok_eq(false, files.exist?("1-\202\240.txt"))
|
226
|
+
|
227
|
+
teardown_files(dir)
|
228
|
+
end
|
229
|
+
|
230
|
+
# test file size total
|
231
|
+
def test_total
|
232
|
+
dir, files = setup_files
|
233
|
+
|
234
|
+
# save file size 1
|
235
|
+
files.fput("size1.txt",'1')
|
236
|
+
ok_eq(1,files.total)
|
237
|
+
|
238
|
+
# save file size 10
|
239
|
+
files.fput("size10.txt",'1'*10)
|
240
|
+
|
241
|
+
# check if total file size is 1 + 10
|
242
|
+
ok_eq(11,files.total)
|
243
|
+
|
244
|
+
# delete file, size 1
|
245
|
+
files.delete("size1.txt")
|
246
|
+
ok_eq(10,files.total)
|
247
|
+
end
|
248
|
+
end
|
249
|
+
end
|
@@ -0,0 +1,82 @@
|
|
1
|
+
# Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
|
2
|
+
# This is free software with ABSOLUTELY NO WARRANTY.
|
3
|
+
# You can redistribute it and/or modify it under the terms of the GNU GPL 2.
|
4
|
+
|
5
|
+
$LOAD_PATH.unshift '..' unless $LOAD_PATH.include? '..'
|
6
|
+
require 'qwik/tokenizer'
|
7
|
+
require 'qwik/parser'
|
8
|
+
require 'qwik/parser-emode'
|
9
|
+
|
10
|
+
module Qwik
|
11
|
+
class Page
|
12
|
+
def get_md5
|
13
|
+
@md5_str = nil if ! defined?(@md5_str)
|
14
|
+
@md5 = nil if ! defined?(@md5)
|
15
|
+
str = self.get
|
16
|
+
return @md5 if str == @md5_str
|
17
|
+
return @md5 = (@md5_str = str).md5hex
|
18
|
+
end
|
19
|
+
|
20
|
+
def get_tokens
|
21
|
+
@tokens_str = nil if ! defined?(@tokens_str)
|
22
|
+
@tokens = nil if ! defined?(@tokens)
|
23
|
+
|
24
|
+
str = self.get
|
25
|
+
return @tokens if str == @tokens_str
|
26
|
+
@tokens_str = str
|
27
|
+
@tokens = TextTokenizer.tokenize(str)
|
28
|
+
return @tokens
|
29
|
+
end
|
30
|
+
|
31
|
+
def get_tree
|
32
|
+
@tree_str = nil if ! defined?(@tree_str)
|
33
|
+
@tree = nil if ! defined?(@tree)
|
34
|
+
|
35
|
+
str = self.get
|
36
|
+
return @tree if str == @tree_str
|
37
|
+
@tree_str = str
|
38
|
+
if EmodePreProcessor.emode?(str)
|
39
|
+
str = EmodePreProcessor.preprocess(str)
|
40
|
+
end
|
41
|
+
tokens = TextTokenizer.tokenize(str)
|
42
|
+
@tree = TextParser.make_tree(tokens)
|
43
|
+
return @tree
|
44
|
+
end
|
45
|
+
|
46
|
+
def get_body_tree
|
47
|
+
@body_tree_str = nil if ! defined?(@body_tree_str)
|
48
|
+
@body_tree = nil if ! defined?(@body_tree)
|
49
|
+
|
50
|
+
str = self.get_body
|
51
|
+
return @body_tree if str == @body_tree_str
|
52
|
+
@body_tree_str = str
|
53
|
+
if EmodePreProcessor.emode?(str)
|
54
|
+
str = EmodePreProcessor.preprocess(str)
|
55
|
+
end
|
56
|
+
tokens = TextTokenizer.tokenize(str)
|
57
|
+
@body_tree = TextParser.make_tree(tokens)
|
58
|
+
return @body_tree
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
if $0 == __FILE__
|
64
|
+
require 'qwik/farm'
|
65
|
+
require 'qwik/server-memory'
|
66
|
+
require 'qwik/test-module-session'
|
67
|
+
$test = true
|
68
|
+
end
|
69
|
+
|
70
|
+
if defined?($test) && $test
|
71
|
+
class TestPageGet < Test::Unit::TestCase
|
72
|
+
include TestSession
|
73
|
+
|
74
|
+
def test_get_body_tree_superpre_sharp
|
75
|
+
page = @site.create_new
|
76
|
+
page.store "{{{\n#t\n}}}\n"
|
77
|
+
expected = [[:pre, "#t\n"]]
|
78
|
+
actual = page.get_body_tree
|
79
|
+
ok_eq expected, actual
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
@@ -0,0 +1,262 @@
|
|
1
|
+
# -*- coding: shift_jis -*-
|
2
|
+
# Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
|
3
|
+
# This is free software with ABSOLUTELY NO WARRANTY.
|
4
|
+
# You can redistribute it and/or modify it under the terms of the GNU GPL 2.
|
5
|
+
|
6
|
+
$LOAD_PATH.unshift '..' unless $LOAD_PATH.include? '..'
|
7
|
+
|
8
|
+
module Qwik
|
9
|
+
class Page
|
10
|
+
def get
|
11
|
+
return @db.get(@key)
|
12
|
+
end
|
13
|
+
alias load get
|
14
|
+
|
15
|
+
def size
|
16
|
+
return @db.size(@key)
|
17
|
+
end
|
18
|
+
|
19
|
+
def mtime
|
20
|
+
return @db.mtime(@key)
|
21
|
+
end
|
22
|
+
|
23
|
+
def get_title
|
24
|
+
title, tags = Page.get_title(self.get)
|
25
|
+
return title if title
|
26
|
+
|
27
|
+
# Abandon to get title and return the page key.
|
28
|
+
return @key
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.get_title(str)
|
32
|
+
first_line = get_first_line(str)
|
33
|
+
return parse_title_line(first_line)
|
34
|
+
end
|
35
|
+
|
36
|
+
def self.get_first_line(str)
|
37
|
+
return nil if str.nil?
|
38
|
+
|
39
|
+
while true
|
40
|
+
# If the str has only one line, return it.
|
41
|
+
i = str.index(?\n)
|
42
|
+
return str if i.nil?
|
43
|
+
|
44
|
+
# Get the first line.
|
45
|
+
line = str[0..i]
|
46
|
+
line.chop! # The end of line is newline.
|
47
|
+
if line[0] == ?#
|
48
|
+
str = str[(i+1)..-1] # Store rest and try again.
|
49
|
+
next
|
50
|
+
end
|
51
|
+
return line
|
52
|
+
end
|
53
|
+
raise # Do not come here.
|
54
|
+
end
|
55
|
+
|
56
|
+
def self.parse_title_line(line)
|
57
|
+
return nil unless /\A\*/s =~ line # must begin with '*'.
|
58
|
+
title = $' # the rest of the line.
|
59
|
+
return nil if title[0] == ?* # must be h2 level.
|
60
|
+
return parse_title(title)
|
61
|
+
end
|
62
|
+
|
63
|
+
def self.parse_title(title, tags=[])
|
64
|
+
return nil if title.nil?
|
65
|
+
|
66
|
+
title = title.strip # Remove start and end spaces.
|
67
|
+
|
68
|
+
return nil if title.empty? # The title should not be empty.
|
69
|
+
|
70
|
+
# If the title has a tag,
|
71
|
+
if /\A\[(.+?)\]/s =~ title
|
72
|
+
tag = $1
|
73
|
+
return [title, tags] if $'.empty?
|
74
|
+
|
75
|
+
title = $'
|
76
|
+
tags << tag
|
77
|
+
return parse_title(title, tags) # Resursive.
|
78
|
+
end
|
79
|
+
|
80
|
+
return [title, tags]
|
81
|
+
end
|
82
|
+
|
83
|
+
def get_body
|
84
|
+
return Page.get_body(self.get)
|
85
|
+
end
|
86
|
+
|
87
|
+
def self.get_body(str)
|
88
|
+
ar = []
|
89
|
+
first_line = true
|
90
|
+
start_body = true
|
91
|
+
str.each_line {|line|
|
92
|
+
if first_line
|
93
|
+
first_line = false
|
94
|
+
if line[0] == ?* && line[1] != ?*
|
95
|
+
# this is title
|
96
|
+
else
|
97
|
+
ar << line
|
98
|
+
end
|
99
|
+
else
|
100
|
+
if start_body
|
101
|
+
if /\A$/ =~ line # Skip empty line.
|
102
|
+
next
|
103
|
+
else
|
104
|
+
start_body = false
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
if ! start_body
|
109
|
+
ar << line
|
110
|
+
end
|
111
|
+
end
|
112
|
+
}
|
113
|
+
return ar.join
|
114
|
+
end
|
115
|
+
|
116
|
+
def get_tags
|
117
|
+
title, tags = Page.get_title(self.get)
|
118
|
+
return tags if tags
|
119
|
+
return nil
|
120
|
+
end
|
121
|
+
|
122
|
+
# ============================== class method
|
123
|
+
def self.valid_as_pagekey?(t)
|
124
|
+
return /\A[A-Za-z_0-9]+\z/ =~ t
|
125
|
+
end
|
126
|
+
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
if $0 == __FILE__
|
131
|
+
require 'qwik/farm'
|
132
|
+
require 'qwik/server-memory'
|
133
|
+
require 'qwik/test-module-session'
|
134
|
+
$test = true
|
135
|
+
end
|
136
|
+
|
137
|
+
if defined?($test) && $test
|
138
|
+
module Qwik
|
139
|
+
class Site
|
140
|
+
# Only for test.
|
141
|
+
def get_pages
|
142
|
+
return @pages
|
143
|
+
end
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
class TestPageGet < Test::Unit::TestCase
|
148
|
+
include TestSession
|
149
|
+
|
150
|
+
def test_all
|
151
|
+
pages = @site.get_pages
|
152
|
+
page = pages.create_new
|
153
|
+
|
154
|
+
# test_get
|
155
|
+
ok_eq('', page.get)
|
156
|
+
ok_eq('', page.load)
|
157
|
+
|
158
|
+
# test_mtime
|
159
|
+
assert_instance_of(Time, page.mtime)
|
160
|
+
|
161
|
+
# test_size
|
162
|
+
is 0, page.size
|
163
|
+
page.store('t')
|
164
|
+
is 1, page.size
|
165
|
+
end
|
166
|
+
|
167
|
+
def test_destructive
|
168
|
+
pages = @site.get_pages
|
169
|
+
page = pages.create('1')
|
170
|
+
|
171
|
+
page.store('t')
|
172
|
+
str = page.get
|
173
|
+
ok_eq('t', str)
|
174
|
+
str.sub!(/t/, 's') # Destructive method.
|
175
|
+
ok_eq('s', str)
|
176
|
+
ok_eq('t', page.get)
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
class TestPageClassMethod < Test::Unit::TestCase
|
181
|
+
def test_valid_as_pagekey?
|
182
|
+
c = Qwik::Page
|
183
|
+
ok_eq(true, !!c.valid_as_pagekey?('t'))
|
184
|
+
ok_eq(false, !!c.valid_as_pagekey?('t t'))
|
185
|
+
end
|
186
|
+
|
187
|
+
def ok_title(e, s)
|
188
|
+
title, tags = Qwik::Page.get_title(s)
|
189
|
+
ok_eq(e, title)
|
190
|
+
end
|
191
|
+
|
192
|
+
def ok_get_title(e, s)
|
193
|
+
res = Qwik::Page.get_title(s)
|
194
|
+
ok_eq(e, res)
|
195
|
+
end
|
196
|
+
|
197
|
+
def test_get_title
|
198
|
+
c = Qwik::Page
|
199
|
+
|
200
|
+
ok_title(nil, nil)
|
201
|
+
ok_title(nil, '')
|
202
|
+
ok_title(nil, 't') # must begin with *
|
203
|
+
ok_title(nil, '-t')
|
204
|
+
ok_title(nil, "b1\nb2")
|
205
|
+
ok_title(nil, '** t') # must be h2 level header.
|
206
|
+
ok_title(nil, '**t')
|
207
|
+
ok_title(nil, "** t\nb")
|
208
|
+
ok_title(nil, '*') # empty
|
209
|
+
ok_title(nil, '* ')
|
210
|
+
ok_title(nil, '* ')
|
211
|
+
|
212
|
+
ok_title('t', '*t') # normal
|
213
|
+
ok_title('t', '* t')
|
214
|
+
ok_title('t', '*t ')
|
215
|
+
ok_title('t', '* t ')
|
216
|
+
ok_title('a b', '*a b')
|
217
|
+
ok_title('a b', '* a b')
|
218
|
+
ok_title('*t', '* *t') # uum...
|
219
|
+
ok_title('- t', '*- t') # uum...
|
220
|
+
ok_title('t', "* t\nb")
|
221
|
+
ok_title('t', "# c\n* t\nb")
|
222
|
+
ok_title('字', '*字')
|
223
|
+
ok_title('あ', '*あ')
|
224
|
+
ok_title('コ', '* コ')
|
225
|
+
ok_title('コ', "* コ\n{{mail(user@e.com)\nあ\n\n}}\n")
|
226
|
+
|
227
|
+
# The title line can contain tag data.
|
228
|
+
ok_get_title(['t', ['tag']], '* [tag] t')
|
229
|
+
ok_get_title(['t', ['t1', 't2']], '* [t1][t2] t')
|
230
|
+
ok_get_title(['[tag]', []], '* [tag]')
|
231
|
+
ok_get_title(['[t2]', ['t1']], '* [t1][t2]')
|
232
|
+
ok_get_title(['t', ['2001-02-03']], '* [2001-02-03] t')
|
233
|
+
end
|
234
|
+
|
235
|
+
def test_get_first_line
|
236
|
+
c = Qwik::Page
|
237
|
+
ok_eq('', c.get_first_line(''))
|
238
|
+
ok_eq('', c.get_first_line("\n"))
|
239
|
+
ok_eq('line1', c.get_first_line('line1'))
|
240
|
+
ok_eq('l1', c.get_first_line("l1\nl2\n"))
|
241
|
+
ok_eq('', c.get_first_line("\nline2\n"))
|
242
|
+
ok_eq('l1', c.get_first_line("# c\nl1\nl2\n"))
|
243
|
+
end
|
244
|
+
|
245
|
+
def test_get_body
|
246
|
+
c = Qwik::Page
|
247
|
+
ok_eq('b', c.get_body("* t\nb"))
|
248
|
+
ok_eq('b', c.get_body("* t\n\nb"))
|
249
|
+
# ok_eq('b', c.get_body("# c\n* t\nb"))
|
250
|
+
ok_eq("b1\nb2", c.get_body("b1\nb2"))
|
251
|
+
ok_eq("** t\nb", c.get_body("** t\nb"))
|
252
|
+
ok_eq('* t2', c.get_body("* t\n* t2"))
|
253
|
+
ok_eq('* t2', c.get_body("* t\n\n* t2"))
|
254
|
+
end
|
255
|
+
|
256
|
+
def test_get_body_sharp
|
257
|
+
c = Qwik::Page
|
258
|
+
ok_eq("a\n#b\nc", c.get_body("a\n#b\nc"))
|
259
|
+
end
|
260
|
+
|
261
|
+
end
|
262
|
+
end
|