From 74e0535659d1f37060680e4730904c4a47e39eba Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Fri, 17 Jun 2016 12:26:08 -0700 Subject: [PATCH] use unformatted raw code examples in styleguide --- docs/styleguide.md | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/docs/styleguide.md b/docs/styleguide.md index 44afe2a..c388b31 100644 --- a/docs/styleguide.md +++ b/docs/styleguide.md @@ -51,14 +51,12 @@ Here are some tips for understanding Electron documentation syntax. An example of [method](https://developer.mozilla.org/en-US/docs/Glossary/Method) documentation: ---- - +``` `methodName(required[, optional]))` -* `require` String (**required**) +* `required` String (**required**) * `optional` Integer - ---- +``` The method name is followed by the arguments it takes. Optional arguments are notated by brackets surrounding the optional argument as well as the comma @@ -77,15 +75,13 @@ or a custom type like Electron's [`webContent`](api/web-content.md). An example of [event](https://developer.mozilla.org/en-US/docs/Web/API/Event) documentation: ---- - +``` Event: 'wake-up' Returns: * `time` String - ---- +``` The event is a string that is used after a `.on` listener method. If it returns a value it and its type is noted below. If you were to listen and respond to @@ -93,6 +89,6 @@ this event it might look something like this: ```javascript Alarm.on('wake-up', (time) => { - console.log(time); -}); + console.log(time) +}) ``` -- 2.7.4