File tree Expand file tree Collapse file tree
src/vs/base/browser/ui/octiconLabel Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,6 +58,8 @@ function editorLoaderConfig(removeAllOSS) {
5858
5959 // never ship marked in editor
6060 result . paths [ 'vs/base/common/marked/marked' ] = 'out-build/vs/base/common/marked/marked.mock' ;
61+ // never ship octicons in editor
62+ result . paths [ 'vs/base/browser/ui/octiconLabel/octiconLabel' ] = 'out-build/vs/base/browser/ui/octiconLabel/octiconLabel.mock' ;
6163
6264 if ( removeAllOSS ) {
6365 result . paths [ 'vs/languages/lib/common/beautify-html' ] = 'out-build/vs/languages/lib/common/beautify-html.mock' ;
Original file line number Diff line number Diff line change 1+ /*---------------------------------------------------------------------------------------------
2+ * Copyright (c) Microsoft Corporation. All rights reserved.
3+ * Licensed under the MIT License. See License.txt in the project root for license information.
4+ *--------------------------------------------------------------------------------------------*/
5+ import octiconLabel = require( 'vs/base/browser/ui/octiconLabel/octiconLabel' ) ;
6+ import { escape } from 'vs/base/common/strings' ;
7+
8+ function expand ( text :string ) : string {
9+ return text ;
10+ }
11+
12+ class MockOcticonLabel {
13+
14+ private _container : HTMLElement ;
15+
16+ constructor ( container : HTMLElement ) {
17+ this . _container = container ;
18+ }
19+
20+ set text ( text : string ) {
21+ let innerHTML = text || '' ;
22+ innerHTML = escape ( innerHTML ) ;
23+ innerHTML = expand ( innerHTML ) ;
24+ this . _container . innerHTML = innerHTML ;
25+ }
26+
27+ }
28+
29+ var mock : typeof octiconLabel = {
30+ expand : expand ,
31+ OcticonLabel : < any > MockOcticonLabel
32+ } ;
33+ export = mock ;
You can’t perform that action at this time.
0 commit comments