Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
log.debug("running substitutions on ", body);
body = this.htmlUnescape(body);
body = body.replace("", "@room");
body = body.replace("", "@room");
body = body.replace("", "@room");
// if we have a file, attempt to get the direct link to the file
if (file && file.public_url_shared) {
const url = this.getSlackFileUrl({
permalink_public: file.permalink_public!,
url_private: file.url_private!,
});
body = url ? body.replace(file.permalink!, url) : body;
}
body = emoji.emojify(body, getFallbackForMissingEmoji);
return body;
}
function printDurationProgress(result){
var statusButton = result.status === 'playing' ? ':arrow_forward:' : ':double_vertical_bar:';
statusButton = emoji.emojify(statusButton);
new ProgressBar(`${statusButton} ${result.status} [:bar] ${result.position} of ${result.duration}`, {
complete: '=',
incomplete: ' ',
width: 50,
total: result.durationSecs
}).tick(result.positionSecs);
console.log();
}
* FeedbackTextScheme.
*/
const DEFAULT_FEEDBACK_TEST_SET: [string, string, string] = [
DEFAULT_FEEDBACK_TEXT,
DEFAULT_FEEDBACK_TEXT,
DEFAULT_FEEDBACK_TEXT
];
const PLEASE_REVIEW_FEEDBACK_TEST_SET: [string, string, string] = [
TextFeedbackSchemes.PLEASE_REVIEW_FEEDBACK_TEXT,
TextFeedbackSchemes.PLEASE_REVIEW_FEEDBACK_TEXT,
TextFeedbackSchemes.PLEASE_REVIEW_FEEDBACK_TEXT
];
const EMOJIES: [string, string, string] = [
emoji.emojify(':blush: :smile: :smiley:'),
emoji.emojify(RAISED_EYEBROW_EMOJI + ' :neutral_face: :thinking_face:'),
emoji.emojify(':cry: :scream: :angry:'),
];
function arraysEqual(array1: T[], array2: T[]): boolean {
return array1.length === array2.length &&
array1.every((element, index) => element === array2[index]);
}
@Component({
selector: 'customizable-demo-form',
templateUrl: './customizable-demo-form.component.html',
styleUrls: ['./customizable-demo-form.component.css'],
})
export class CustomizableDemoFormComponent implements OnInit {
export const logInfo = (s: string) => log(emoji.emojify(chalk.bold(s)));
export const logDetail = (s: string) => log(emoji.emojify(chalk.dim(s)));
<div style="{styles.editorRendered}"> {
(this as any).renderer = x
if (x && this.state.description) x.innerHTML = emojify(marked(this.state.description))
}} />
</div>
module.exports = (webhook, matrix) => {
if (webhook.emoji !== false && matrix.sender.displayName) {
matrix.sender.displayName = emoji.emojify(matrix.sender.displayName, /*onMissing=*/null, /*format=*/null);
}
};
private getDescription = (): string => {
if (!this.props.server.description) return ''
return sanitize(emojify(marked(this.props.server.description)))
}
const replacer = (match) => emoji.emojify(match)
markdown = markdown.replace(/(:.*:)/g, replacer)
public async UNSAFE_componentWillUpdate (nextProps: any, nextState: any): Promise {
if (!nextState.markdown || nextState.markdown === this.state.markdown) return
if (!this.renderer) return
this.renderer.innerHTML = emojify(marked(nextState.markdown))
}
export const logInfo = (s: string) => log(emoji.emojify(chalk.default.bold(s)));
export const logDetail = (s: string) => log(emoji.emojify(chalk.default.dim(s)));