Adding help for ASCIIDoc, fixing pod help
This commit is contained in:
Regular → Executable
+62
@@ -104,4 +104,66 @@ var ASCIIDoc = {
|
||||
|
||||
jQuery.GollumEditor.defineLanguage('asciidoc', ASCIIDoc);
|
||||
|
||||
|
||||
var ASCIIDocHelp = [
|
||||
{
|
||||
menuName: 'Text Formatting',
|
||||
content: [
|
||||
{
|
||||
menuName: 'Headers',
|
||||
data: '<p>ASCIIDoc headers can be written in two ways: with differing underlines or with different indentation using <code>=</code> (equals sign). ASCIIDoc supports headings 1-4. The editor will automatically use the <code>=</code> notation. To create a level one header, prefix your line with one <code>=</code>. Level two headers are created with <code>==</code> and so on.</p>'
|
||||
},
|
||||
{
|
||||
menuName: 'Bold / Italic',
|
||||
data: '<p>To display text as <strong>bold</strong>, wrap the text in <code>*</code> (asterisks). To display text as <em>italic</em>, wrap the text in <code>_</code> (underscores). To create <code>monospace</code> text, wrap the text in <code>+</code> (plus signs).'
|
||||
},
|
||||
{
|
||||
menuName: 'Scripts',
|
||||
data: '<p>Superscript and subscript is created the same way as other inline formats. To create superscript text, wrap your text in <code>^</code> (carats). To create subscript text, wrap your text in <code>~</code> (tildes).</p>'
|
||||
},
|
||||
{
|
||||
menuName: 'Special Characters',
|
||||
data: '<p>ASCIIDoc will automatically convert textual representations of commonly-used special characters. For example, <code>(R)</code> becomes ®, <code>(C)</code> becomes © and <code>(TM)</code> becomes ™.</p>'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
menuName: 'Blocks',
|
||||
content: [
|
||||
{
|
||||
menuName: 'Paragraphs',
|
||||
data: '<p>ASCIIDoc allows paragraphs to have optional titles or icons to denote special sections. To make a normal paragraph, simply add a line between blocks and a new paragraph will start. If you want to title your paragraphs, adda line prefixed by <code>.</code> (full stop). An example paragraph with optional title is displayed below:<br><br><code>.Optional Title<br><br>This is my paragraph. It is two sentences long.</code></p>'
|
||||
},
|
||||
{
|
||||
menuName: 'Source Blocks',
|
||||
data: '<p>To create source blocks (long blocks of code), follow the same syntax as above but with an extra line denoting the inline source and lines of four dashes (<code>----</code>) delimiting the source block.. An example of Python source is below:<br><br><code>.python.py<br>[source,python]<br>----<br># i just wrote a comment in python<br># and maybe one more<br>----</code></p>'
|
||||
},
|
||||
{
|
||||
menuName: 'Comment Blocks',
|
||||
data: '<p>Comment blocks are useful if you want to keep notes for yourself inline but do not want them displayed to the public. To create a comment block, simply wrap the paragraph in dividers with four slashes (<code>////</code>). An example comment block is below:<br><br><code>////<br>My comment block is here now<br><br>It can be multiple paragraphs. Really.<br>////</p>'
|
||||
},
|
||||
{
|
||||
menuName: 'Quote Blocks',
|
||||
data: '<p>Quote blocks work much like comment blocks — simply create dividers using four underscores (<code>____</code>) around your quote. An example quote block is displayed below:<br><code>____<br>This is my quote block. Quote something nice here, otherwise there is no point in quoting.<br>____</code></p>'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
menuName: 'Macros',
|
||||
content: [
|
||||
{
|
||||
menuName: 'Links',
|
||||
data: '<p>To create links to external pages, you can simply write the URI if you want the URI to link to itself. (i.e., <code>http://github.com/</code> will automatically be parsed to <a href="javascript:void(0);">http://github.com/</a>. If you want different text to be displayed, simply append it to the end of the URI in between <code>[</code> (brackets.) For example, <code>http://github.com/[GitHub]</code> will be parsed as <a href="javascript:void(0);">GitHub</a>, with the URI pointing to <code>http://github.com</code>.</p>'
|
||||
},
|
||||
{
|
||||
menuName: 'Images',
|
||||
data: '<p>Images in ASCIIDoc work much like hyperlinks, but image URLs are prefixed with <code>image:</code>. For example, to link to an image at <code>images/icons/home.png</code>, write <code>image:images/icons/home.png</code>. Alt text can be added by appending the text to the URI in <code>[</code> (brackets).</p>'
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
jQuery.GollumEditor.defineHelp('asciidoc', ASCIIDocHelp);
|
||||
|
||||
})();
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ var PodHelp = [
|
||||
data: '<p>All command paragraphs start with <code>=</code> (equals sign).</p><p>To create headings 1 through 4, begin your command paragraph with <code>=headN</code>, where <code>N</code> is the number of the heading 1 through 4. For example, to make a first-order heading (the largest possible,) write <code>=head1</code>, then on the next line begin your paragraph that you want under the heading.</p>'
|
||||
},
|
||||
{
|
||||
menuName: 'Beginning and Ending',
|
||||
menuName: 'Beginning & Ending',
|
||||
data: '<p>Perl pod blocks should begin with <code>=pod</code> and end with <code>=cut</code>, 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.</p>'
|
||||
},
|
||||
{
|
||||
@@ -92,19 +92,17 @@ var PodHelp = [
|
||||
]
|
||||
},
|
||||
{
|
||||
{
|
||||
menuName: 'Formatting',
|
||||
content: [
|
||||
{
|
||||
menuName: 'Text',
|
||||
data: '<p>Formatting text as <strong>bold</strong>, <em>italic</em> or <code>code</code> works in the <code>S<word></code> syntax, where <code>S</code> is an abbreviation for the type of text you are trying to create. For example, <code>B<my bold text></code> becomes <strong>my bold text</strong>, <code>I<italic text></code> becomes <em>italic text</em> and <code>C<code here()></code> becomes <code>code here()</code>.</p>'
|
||||
},
|
||||
{
|
||||
menuName: 'Hyperlinks',
|
||||
data: '<p>Writing hyperlinks in pod is much like formatting text, using the same <code>S<></code> syntax. Instead of <code>B</code>, <code>I</code> or <code>C</code>, use <code>L</code> to begin a hyperlink.</p><p>pod allows you to hyperlink to a <code>man</code> page, a Perl documentation page, or another web page. To link to a <code>man</code> or Perl documentation page, simply include the page name in the link (e.g. <code>L<perl(1)></code> or <code>L<Net::Ping></code>). 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 <code>L<GitHub|http://github.com/></code>).'
|
||||
}
|
||||
]
|
||||
}
|
||||
menuName: 'Formatting',
|
||||
content: [
|
||||
{
|
||||
menuName: 'Text',
|
||||
data: '<p>Formatting text as <strong>bold</strong>, <em>italic</em> or <code>code</code> works in the <code>S<word></code> syntax, where <code>S</code> is an abbreviation for the type of text you are trying to create. For example, <code>B<my bold text></code> becomes <strong>my bold text</strong>, <code>I<italic text></code> becomes <em>italic text</em> and <code>C<code here()></code> becomes <code>code here()</code>.</p>'
|
||||
},
|
||||
{
|
||||
menuName: 'Hyperlinks',
|
||||
data: '<p>Writing hyperlinks in pod is much like formatting text, using the same <code>S<></code> syntax. Instead of <code>B</code>, <code>I</code> or <code>C</code>, use <code>L</code> to begin a hyperlink.</p><p>pod allows you to hyperlink to a <code>man</code> page, a Perl documentation page, or another web page. To link to a <code>man</code> or Perl documentation page, simply include the page name in the link (e.g. <code>L<perl(1)></code> or <code>L<Net::Ping></code>). 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 <code>L<GitHub|http://github.com/></code>).'
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user