From d4cba8aeb2345cfc6b143ddc105cef0902f56afb Mon Sep 17 00:00:00 2001 From: Eston Bond Date: Tue, 30 Nov 2010 16:10:32 -0800 Subject: [PATCH] Finally finished pod documentation --- .../javascript/gollum-editor/langs/pod.js | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) mode change 100644 => 100755 lib/gollum/frontend/public/javascript/gollum-editor/langs/pod.js diff --git a/lib/gollum/frontend/public/javascript/gollum-editor/langs/pod.js b/lib/gollum/frontend/public/javascript/gollum-editor/langs/pod.js old mode 100644 new mode 100755 index a1c9ca26..4d35f65c --- a/lib/gollum/frontend/public/javascript/gollum-editor/langs/pod.js +++ b/lib/gollum/frontend/public/javascript/gollum-editor/langs/pod.js @@ -68,4 +68,46 @@ var Pod = { jQuery.GollumEditor.defineLanguage('pod', Pod); + +var PodHelp = [ + { + menuName: 'Command Paragraphs', + content: [ + { + menuName: 'Headings', + data: '

All command paragraphs start with = (equals sign).

To create headings 1 through 4, begin your command paragraph with =headN, where N is the number of the heading 1 through 4. For example, to make a first-order heading (the largest possible,) write =head1, then on the next line begin your paragraph that you want under the heading.

' + }, + { + menuName: 'Beginning and Ending', + data: '

Perl pod blocks should begin with =pod and end with =cut, signifying to Pod parsers that the pod block has begun and ended. These command paragraphs only signal the beginning and end of a pod block.

' + }, + { + menuName: 'Other Formats', + data: '

pod also allows blocks in other formats, such as HTML or plain text. To create one of these blocks, use the =format SYNTAX command paragraph, where SYNTAX is the syntax of the block (e.g. html or txt). At the end of your block, use the =end SYNTAX block.

' + }, + { + menuName: 'Encoding', + data: '

If you are having encoding troubles, use the =encoding ENC_TYPE command, where ENC_TYPE is the encoding type (e.g. utf8, koi8-r). This will affect the entire document, not just the block below the command.

' + } + ] + }, + { + { + menuName: 'Formatting', + content: [ + { + menuName: 'Text', + data: '

Formatting text as bold, italic or code works in the S<word> syntax, where S is an abbreviation for the type of text you are trying to create. For example, B<my bold text> becomes my bold text, I<italic text> becomes italic text and C<code here()> becomes code here().

' + }, + { + menuName: 'Hyperlinks', + data: '

Writing hyperlinks in pod is much like formatting text, using the same S<> syntax. Instead of B, I or C, use L to begin a hyperlink.

pod allows you to hyperlink to a man page, a Perl documentation page, or another web page. To link to a man or Perl documentation page, simply include the page name in the link (e.g. L<perl(1)> or L<Net::Ping>). If you want to link to a web page, separate the URL and the link text with a pipe (e.g. to link to github.com, write L<GitHub|http://github.com/>).' + } + ] + } + } +]; + +jQuery.GollumEditor.defineHelp('pod', PodHelp); + })();