mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
docs: mustache helper safety check
This commit is contained in:
parent
079d7eb6ca
commit
0ae4416242
@ -3,11 +3,14 @@ const toc = require('markdown-toc');
|
|||||||
const handlebars = require('handlebars');
|
const handlebars = require('handlebars');
|
||||||
|
|
||||||
const helpers = require('handlebars-helpers')({
|
const helpers = require('handlebars-helpers')({
|
||||||
handlebars: handlebars
|
handlebars: handlebars
|
||||||
});
|
});
|
||||||
|
|
||||||
// Allows pipe characters to be used within markdown tables.
|
// Allows pipe characters to be used within markdown tables.
|
||||||
handlebars.registerHelper('depipe', (text) => {
|
handlebars.registerHelper('depipe', (text) => {
|
||||||
|
if (!text) {
|
||||||
|
return text;
|
||||||
|
}
|
||||||
return text.replace('|', `\\|`);
|
return text.replace('|', `\\|`);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Show or hide a specified source item in a specified scene.
|
* Show or hide a specified source item in a specified scene.
|
||||||
*
|
*
|
||||||
* @param {String} `source` Name of the source in the specified scene.
|
* @param {String} `source` Name of the source in the specified scene.
|
||||||
* @param {boolean} `render` Desired visibility.
|
* @param {boolean} `render` Desired visibility.
|
||||||
* @param {String (optional)} `scene-name` Name of the scene where the source resides. Defaults to the currently active scene.
|
* @param {String (optional)} `scene-name` Name of the scene where the source resides. Defaults to the currently active scene.
|
||||||
@ -230,10 +230,10 @@ void WSRequestHandler::HandleGetMute(WSRequestHandler* req) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the audio sync offset of a specified source.
|
* Set the audio sync offset of a specified source.
|
||||||
*
|
*
|
||||||
* @param {String} `source` The name of the source.
|
* @param {String} `source` The name of the source.
|
||||||
* @param {int} `offset` The desired audio sync offset (in nanoseconds).
|
* @param {int} `offset` The desired audio sync offset (in nanoseconds).
|
||||||
*
|
*
|
||||||
* @api requests
|
* @api requests
|
||||||
* @name SetSyncOffset
|
* @name SetSyncOffset
|
||||||
* @category sources
|
* @category sources
|
||||||
@ -265,12 +265,12 @@ void WSRequestHandler::HandleSetSyncOffset(WSRequestHandler* req) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the audio sync offset of a specified source.
|
* Get the audio sync offset of a specified source.
|
||||||
*
|
*
|
||||||
* @param {String} `source` The name of the source.
|
* @param {String} `source` The name of the source.
|
||||||
*
|
*
|
||||||
* @return {String} `name` The name of the source.
|
* @return {String} `name` The name of the source.
|
||||||
* @return {int} `offset` The audio sync offset (in nanoseconds).
|
* @return {int} `offset` The audio sync offset (in nanoseconds).
|
||||||
*
|
*
|
||||||
* @api requests
|
* @api requests
|
||||||
* @name GetSyncOffset
|
* @name GetSyncOffset
|
||||||
* @category sources
|
* @category sources
|
||||||
@ -303,7 +303,7 @@ void WSRequestHandler::HandleGetSyncOffset(WSRequestHandler* req) {
|
|||||||
* @param {String} `item` The name of the source item.
|
* @param {String} `item` The name of the source item.
|
||||||
* @param {double} `x` X coordinate.
|
* @param {double} `x` X coordinate.
|
||||||
* @param {double} `y` Y coordinate.
|
* @param {double} `y` Y coordinate.
|
||||||
|
|
||||||
*
|
*
|
||||||
* @api requests
|
* @api requests
|
||||||
* @name SetSceneItemPosition
|
* @name SetSceneItemPosition
|
||||||
@ -351,7 +351,7 @@ void WSRequestHandler::HandleGetSyncOffset(WSRequestHandler* req) {
|
|||||||
* @param {String} `item` The name of the source item.
|
* @param {String} `item` The name of the source item.
|
||||||
* @param {double} `x-scale` Width scale factor.
|
* @param {double} `x-scale` Width scale factor.
|
||||||
* @param {double} `y-scale` Height scale factor.
|
* @param {double} `y-scale` Height scale factor.
|
||||||
* @param {double} `rotation` Source item rotation (in degrees).
|
* @param {double} `rotation` Source item rotation (in degrees).
|
||||||
*
|
*
|
||||||
* @api requests
|
* @api requests
|
||||||
* @name SetSceneItemTransform
|
* @name SetSceneItemTransform
|
||||||
@ -595,7 +595,7 @@ void WSRequestHandler::HandleGetSceneItemProperties(WSRequestHandler* req) {
|
|||||||
* @param {String} `bounds.type` The new bounds type of the source.
|
* @param {String} `bounds.type` The new bounds type of the source.
|
||||||
* @param {int} `bounds.alignment` The new alignment of the bounding box. (0-2, 4-6, 8-10)
|
* @param {int} `bounds.alignment` The new alignment of the bounding box. (0-2, 4-6, 8-10)
|
||||||
* @param {double} `bounds.x` The new width of the bounding box.
|
* @param {double} `bounds.x` The new width of the bounding box.
|
||||||
* @param {double} `bounds.y' The new height of the bounding box.
|
* @param {double} `bounds.y` The new height of the bounding box.
|
||||||
*
|
*
|
||||||
* @api requests
|
* @api requests
|
||||||
* @name SetSceneItemProperties
|
* @name SetSceneItemProperties
|
||||||
@ -1534,4 +1534,4 @@ void WSRequestHandler::HandleSetSourceSettings(WSRequestHandler* req) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
req->SendOKResponse(response);
|
req->SendOKResponse(response);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user