From 879a895ada2eda2adabc7cf829f037f4f9259dcf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bartosz=20Dziewo=C5=84ski?= Date: Mon, 5 Feb 2018 15:50:24 +0100 Subject: [PATCH] jquery.localize: Fix rendering of generated documentation JSDuck expects an empty line before and after code samples. Change-Id: I45cf3a8e7c88476e61a681cfc44fc497e8f1c67e --- resources/src/jquery/jquery.localize.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/resources/src/jquery/jquery.localize.js b/resources/src/jquery/jquery.localize.js index b1bf0f48ae..20dc1b20fe 100644 --- a/resources/src/jquery/jquery.localize.js +++ b/resources/src/jquery/jquery.localize.js @@ -29,6 +29,7 @@ * with attributes that do not have the "-msg" suffix and contain a localized message. * * Example: + * * // Messages: { 'title': 'Awesome', 'desc': 'Cat doing backflip' 'search' contains 'Search' } * var html = '\ *

\ @@ -39,6 +40,7 @@ * $( 'body' ).append( $( html ).localize() ); * * Appends something like this to the body... + * *

* Awesome * Cat doing backflip @@ -52,17 +54,20 @@ * of a message in the same selection being localized - they will all recieve the same parameters. * * Example: + * * // Messages: { 'easy-as': 'Easy as $1 $2 $3.' } * var html = '

'; * $( 'body' ).append( $( html ).localize( { 'params': { 'easy-as': ['a', 'b', 'c'] } } ) ); * * Appends something like this to the body... + * *

Easy as a, b, c

* * Raw HTML content can be used, instead of it being escaped as text. To do this, just use the raw * attribute on a msg element. * * Example: + * * // Messages: { 'hello': 'Hello $1!' } * var html = '\ *

\ @@ -72,6 +77,7 @@ * $( 'body' ).append( $( html ).localize( { 'params': { 'hello': ['world'] } } ) ); * * Appends something like this to the body... + * *

* <b><i>Hello</i> world!</b> * Hello world! @@ -81,22 +87,26 @@ * of messages. This is important for improving re-usability of templates. * * Example: + * * // Messages: { 'good-afternoon': 'Good afternoon' } * var html = '

'; * $( 'body' ).append( $( html ).localize( { 'keys': { 'greeting': 'good-afternoon' } } ) ); * * Appends something like this to the body... + * *

Good afternoon

* * Message keys can also be prefixed globally, which is handy when writing extensions, where by * convention all messages are prefixed with the extension's name. * * Example: + * * // Messages: { 'teleportation-warning': 'You may not get there all in one piece.' } * var html = '

'; * $( 'body' ).append( $( html ).localize( { 'prefix': 'teleportation-' } ) ); * * Appends something like this to the body... + * *

You may not get there all in one piece.

* * @param {Object} options Map of options to be used while localizing -- 2.20.1