mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-11-03 21:43:18 +00:00
Add a tagged template function for HTML supporting HTML interpolation.
This allows better Prettier integration: Prettier recognizes and reformats tagged template literals with a tag named ‘html’. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import {ipcRenderer} from 'electron';
|
||||
|
||||
import {htmlEscape} from 'escape-goat';
|
||||
|
||||
import type {HTML} from '../../../common/html';
|
||||
import {html} from '../../../common/html';
|
||||
import * as SystemUtil from '../utils/system-util';
|
||||
|
||||
import type {TabProps} from './tab';
|
||||
@@ -15,8 +15,8 @@ export default class ServerTab extends Tab {
|
||||
this.init();
|
||||
}
|
||||
|
||||
templateHTML(): string {
|
||||
return htmlEscape`
|
||||
templateHTML(): HTML {
|
||||
return html`
|
||||
<div class="tab" data-tab-id="${this.props.tabIndex}">
|
||||
<div class="server-tooltip" style="display:none">${this.props.name}</div>
|
||||
<div class="server-tab-badge"></div>
|
||||
|
||||
Reference in New Issue
Block a user