Implement Wiki#preview_page.

This commit is contained in:
Tom Preston-Werner
2010-07-31 14:29:54 -04:00
parent 4fc446b8a3
commit 206c8b0712
3 changed files with 40 additions and 0 deletions
+7
View File
@@ -383,6 +383,13 @@ Get a specific version of a given static file:
wiki.file('asset.js', '5ec521178e0eec4dc39741a8978a2ba6616d0f0a')
Get an in-memory Page preview (useful for generating previews for web
interfaces):
preview = wiki.preview_page("My Page", "# Contents", :markdown)
preview.formatted_data
# => "<h1>Contents</h1>"
Methods that write to the repository require a Hash of commit data that takes
the following form: