Skip to content

Commit 9787df6

Browse files
devvaannshabose
authored andcommitted
fix: replace escape char for braces with code blocks
1 parent d773b04 commit 9787df6

File tree

5 files changed

+16
-12
lines changed

5 files changed

+16
-12
lines changed

src/features/QuickViewManager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ define(function (require, exports, module) {
411411
* Returns a popover array with the list of popovers to be rendered after filtering from providers.
412412
* @param results
413413
* @param providerInfos
414-
* @return []
414+
* @return {Object[]}
415415
* @private
416416
*/
417417
function _getPopover(results, providerInfos) {

src/utils/EventManager.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,17 +143,21 @@ define(function (require, exports, module) {
143143
* // to prevent collisions. EventHandlers starting with `ph-` and `br-` are reserved as system handlers
144144
* // and not available for use in extensions.
145145
* window.Phoenix.TRUSTED_ORIGINS ["http://mydomain.com"] = true;
146+
* ```js
146147
* EventManager.registerEventHandler("`extensionName`-iframeMessageHandler", exports);
147-
* exports.on("iframeHelloEvent", function(_ev, event)\{
148+
* exports.on("iframeHelloEvent", function(_ev, event){
148149
* console.log(event.data.message);
149150
* });
151+
* ```
150152
*
151153
* // Now from your iframe, send a message to the above event handler using:
152-
* window.parent.postMessage(\{
154+
* ```js
155+
* window.parent.postMessage({
153156
* handlerName: "`extensionName`-iframeMessageHandler",
154157
* eventName: "iframeHelloEvent",
155158
* message: "hello world"
156159
* }, '*');
160+
* ```
157161
* // `you should replace * with the trusted domains list in production for security.` See how this can be
158162
* // done securely with this example: https://github.com/phcode-dev/phcode.live/blob/6d64386fbb9d671cdb64622bc48ffe5f71959bff/docs/virtual-server-loader.js#L43
159163
* // Abstract is that, pass in the parentOrigin as a query string parameter in iframe, and validate it against

src/utils/ExtensionInterface.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,9 @@
4848
* ```js
4949
* let angularCli;
5050
* ExtensionInterface.waitAndGetExtensionInterface("angularCli").then(interfaceObj=> angularCli = interfaceObj);
51-
* ...
52-
* if(angularCli)\{ // check if angular cli is avilable
51+
* if(angularCli){ // check if angular cli is avilable
5352
* angularCli.callSomeFunction();
5453
* }
55-
* ...
5654
* ```
5755
*
5856
* **Note** that the `angularCli` interface is async populated as and when the cli extension is loaded and the
@@ -105,13 +103,13 @@ define(function (require, exports, module) {
105103
* getter to get hold of extensions interface predictably.
106104
*
107105
* To get a registered interface `angularCli`
106+
* ```js
108107
* let angularCli;
109108
* ExtensionInterface.waitAndGetExtensionInterface("angularCli").then(interfaceObj=> angularCli = interfaceObj);
110-
* ...
111-
* if(angularCli)\{ // check if angular cli is avilable
109+
* if(angularCli){ // check if angular cli is avilable
112110
* angularCli.callSomeFunction();
113111
* }
114-
* ...
112+
* ```
115113
*
116114
* @param extensionInterfaceName
117115
* @return {Promise}

src/utils/FeatureGate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ define(function (require, exports, module) {
8989

9090
/**
9191
* Returns an array of all named registered feature gates.
92-
* @return [] list of registered features
92+
* @return {string[]} list of registered features
9393
* @type {function}
9494
*/
9595
function getAllRegisteredFeatures() {

src/worker/IndexingWorker.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,12 @@ define(function (require, exports, module) {
9696
* To Execute a named function `extensionName.sayHello` in the worker from phoenix
9797
* // in my_worker.js. It is a good practice to prefix your `[extensionName]`
9898
* // to exec handler to prevent name collisions with other extensions.
99-
* WorkerComm.setExecHandler("extensionName.sayHello", (arg)=>\{
99+
* ```js
100+
* WorkerComm.setExecHandler("extensionName.sayHello", (arg)=>{
100101
* console.log("hello from worker ", arg); // prints "hello from worker phoenix"
101102
* return "Hello Phoenix";
102-
* });
103+
* });
104+
* ```
103105
* // In Phoenix/extension
104106
* let workerMessage = await IndexingWorker.execPeer("extensionName.sayHello", "phoenix");
105107
* console.log(workerMessage); // prints "Hello Phoenix"

0 commit comments

Comments
 (0)