From b774ee5cd0e79b703390f883e759cd85063561e2 Mon Sep 17 00:00:00 2001 From: Guillaume Grossetie Date: Wed, 17 Sep 2014 19:12:56 +0200 Subject: [PATCH] Use Asciidoctor 1.5.0 new syntax backtick Asciidoctor 1.5.0 is now using backtick for inline code. Replaces ASCIIDoc by AsciiDoc to respect the case. --- .../javascript/editor/langs/asciidoc.js | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/gollum/public/gollum/javascript/editor/langs/asciidoc.js b/lib/gollum/public/gollum/javascript/editor/langs/asciidoc.js index 31322c06..f8ee5cd6 100644 --- a/lib/gollum/public/gollum/javascript/editor/langs/asciidoc.js +++ b/lib/gollum/public/gollum/javascript/editor/langs/asciidoc.js @@ -1,11 +1,11 @@ /** - * ASCIIDoc Language Definition + * AsciiDoc Language Definition * */ (function($) { -var ASCIIDoc = { +var AsciiDoc = { 'function-bold' : { search: /(^[\n]+)([\n\s]*)/g, @@ -19,7 +19,7 @@ var ASCIIDoc = { 'function-code' : { search: /(^[\n]+)([\n\s]*)/g, - replace: "+$1+$2" + replace: "`$1`$2" }, 'function-ul' : { @@ -102,20 +102,20 @@ var ASCIIDoc = { }; -$.GollumEditor.defineLanguage('asciidoc', ASCIIDoc); +$.GollumEditor.defineLanguage('asciidoc', AsciiDoc); -var ASCIIDocHelp = [ +var AsciiDocHelp = [ { menuName: 'Text Formatting', content: [ { menuName: 'Headers', - data: '

ASCIIDoc headers can be written in two ways: with differing underlines or with different indentation using = (equals sign). ASCIIDoc supports headings 1-4. The editor will automatically use the = notation. To create a level one header, prefix your line with one =. Level two headers are created with == and so on.

' + data: '

AsciiDoc headers can be written in two ways: with differing underlines or with different indentation using = (equals sign). AsciiDoc supports headings 1-4. The editor will automatically use the = notation. To create a level one header, prefix your line with one =. Level two headers are created with == and so on.

' }, { menuName: 'Bold / Italic', - data: '

To display text as bold, wrap the text in * (asterisks). To display text as italic, wrap the text in _ (underscores). To create monospace text, wrap the text in + (plus signs).' + data: '

To display text as bold, wrap the text in * (asterisks). To display text as italic, wrap the text in _ (underscores). To create monospace text, wrap the text in ` (backtick).' }, { menuName: 'Scripts', @@ -123,7 +123,7 @@ var ASCIIDocHelp = [ }, { menuName: 'Special Characters', - data: '

ASCIIDoc will automatically convert textual representations of commonly-used special characters. For example, (R) becomes ®, (C) becomes © and (TM) becomes ™.

' + data: '

AsciiDoc will automatically convert textual representations of commonly-used special characters. For example, (R) becomes ®, (C) becomes © and (TM) becomes ™.

' } ] }, @@ -132,7 +132,7 @@ var ASCIIDocHelp = [ content: [ { menuName: 'Paragraphs', - data: '

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 . (full stop). An example paragraph with optional title is displayed below:

.Optional Title

This is my paragraph. It is two sentences long.

' + data: '

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 . (full stop). An example paragraph with optional title is displayed below:

.Optional Title

This is my paragraph. It is two sentences long.

' }, { menuName: 'Source Blocks', @@ -157,12 +157,12 @@ var ASCIIDocHelp = [ }, { menuName: 'Images', - data: '

Images in ASCIIDoc work much like hyperlinks, but image URLs are prefixed with image:. For example, to link to an image at images/icons/home.png, write image:images/icons/home.png. Alt text can be added by appending the text to the URI in [ (brackets).

' + data: '

Images in AsciiDoc work much like hyperlinks, but image URLs are prefixed with image:. For example, to link to an image at images/icons/home.png, write image:images/icons/home.png. Alt text can be added by appending the text to the URI in [ (brackets).

' } ] } ]; -$.GollumEditor.defineHelp('asciidoc', ASCIIDocHelp); +$.GollumEditor.defineHelp('asciidoc', AsciiDocHelp); })(jQuery);