Skip to content

Commit 00b3e86

Browse files
authored
Standardize formatting (#327)
* Remove `...` from code blocks * Use same Example formatting * Fix illegal JavaScript blocks
1 parent 76193b1 commit 00b3e86

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

module-development/core-module-file.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ set this value in the Node helper.
7373
be run in older versions. Keep this in mind if you get issue reports on your
7474
module.
7575

76-
Example:
76+
**Example:**
7777

7878
```js
7979
requiresVersion: "2.1.0",
@@ -338,17 +338,17 @@ asynchronously. You can listen for the
338338
when the rendering is complete and the new dom is safe to interact with. This
339339
notification only fires if the content will really change.
340340

341-
As an example: the clock modules calls this method every second:
341+
**Example:**
342+
343+
The clock modules calls this method every second:
342344

343345
```js
344-
...
345346
start: function() {
346347
let self = this;
347348
setInterval(function() {
348349
self.updateDom(); // no speed defined, so it updates instantly.
349350
}, 1000); //perform every 1000 milliseconds.
350351
},
351-
...
352352
```
353353

354354
**_options_ Object** - (_Introduced in version: 2.25.0._) Optional. Allows you
@@ -367,10 +367,9 @@ module needs to be updated
367367
| in | String | Animate name when module will be shown (after dom update), it will use an `animateIn` type name (see [Animation Guide](/modules/animate#animatein)) |
368368
| out | String | Animate name when module will be hidden (before dom update), it will use an `animateOut` type name (see [Animation Guide](/modules/animate#animateout)) |
369369

370-
As an example:
370+
**Example:**
371371

372372
```js
373-
...
374373
this.updateDom( {
375374
options: {
376375
speed: 1000, // animation duration
@@ -380,7 +379,6 @@ As an example:
380379
}
381380
}
382381
})
383-
...
384382
```
385383

386384
### `this.sendNotification(notification, payload)`
@@ -636,7 +634,7 @@ translator to change the word order in the sentence to be translated.
636634

637635
```js
638636
const timeUntilEnd = moment(event.endDate, "x").fromNow(true);
639-
this.translate("RUNNING", { "timeUntilEnd": timeUntilEnd) }); // Will return a translated string for the identifier RUNNING, replacing `{timeUntilEnd}` with the contents of the variable `timeUntilEnd` in the order that translator intended.
637+
this.translate("RUNNING", { "timeUntilEnd": timeUntilEnd }); // Will return a translated string for the identifier RUNNING, replacing `{timeUntilEnd}` with the contents of the variable `timeUntilEnd` in the order that translator intended.
640638
```
641639

642640
**Example English.json file:**
@@ -665,9 +663,9 @@ did not support the word order, it is recommended to have the fallback layout.
665663
```js
666664
const timeUntilEnd = moment(event.endDate, "x").fromNow(true);
667665
this.translate("RUNNING", {
668-
"fallback": this.translate("RUNNING") + " {timeUntilEnd}"
669-
"timeUntilEnd": timeUntilEnd
670-
)}); // Will return a translated string for the identifier RUNNING, replacing `{timeUntilEnd}` with the contents of the variable `timeUntilEnd` in the order that translator intended. (has a fallback)
666+
"fallback": this.translate("RUNNING") + " {timeUntilEnd}",
667+
"timeUntilEnd": timeUntilEnd,
668+
}); // Will return a translated string for the identifier RUNNING, replacing `{timeUntilEnd}` with the contents of the variable `timeUntilEnd` in the order that translator intended. (has a fallback)
671669
```
672670

673671
**Example Swedish.json file that does not have the variable in it:**

0 commit comments

Comments
 (0)