ide на основе vs code · VibeGit
ide на основе vs code Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
krutaya-ide-na-osnove-vs-code / src / vs / base / test / common / markdownString.test.ts 195 строк · изменён 14 нояб., 04:52
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
import assert from 'assert' ;
import { IMarkdownString, MarkdownString } from '../../common/htmlContent.js' ;
import { ensureNoDisposablesAreLeakedInTestSuite } from './utils.js' ;
import { URI } from '../../common/uri.js' ;
suite ( 'MarkdownString' , ( ) => {
ensureNoDisposablesAreLeakedInTestSuite ( ) ;
test ( 'Escape leading whitespace' , function ( ) {
const mds = new MarkdownString
mds
assert mds value
mds
mds
assert mds value
mds
mds
assert mds value
target label title expected
mds
mds target label title
assert mds value expected
dto IMarkdownString
value
baseUri
supportThemeIcons
isTrusted
supportHtml
uris
mds MarkdownString dto
assert mds value dto value
assert mds baseUri dto baseUri
assert mds supportThemeIcons dto supportThemeIcons
assert mds isTrusted dto isTrusted
assert mds supportHtml dto supportHtml
assert mds uris dto uris
instance
mds2 MarkdownString instance
assert mds2 value
assert instance value
lang code result
mds
mds lang code
assert mds value result
mds supportThemeIcons
mds
assert mds value
mds supportThemeIcons
mds
assert mds value
mds supportThemeIcons
mds
assert mds value
mds supportThemeIcons
mds
assert mds value
mds supportThemeIcons
mds
assert mds value
mds supportThemeIcons
mds
assert mds value
(
)
;
.
appendText
(
'Hello\n Not a code block'
)
;
.
strictEqual
(
.
,
'Hello\n\n Not a code block'
)
;
}
)
;
test
(
'MarkdownString.appendText doesn\'t escape quote #109040'
,
function
(
)
{
const
=
new
MarkdownString
(
)
;
.
appendText
(
'> Text\n>More'
)
;
.
strictEqual
(
.
,
'\\> Text\n\n\\>More'
)
;
}
)
;
test
(
'appendText'
,
(
)
=>
{
const
=
new
MarkdownString
(
)
;
.
appendText
(
'# foo\n*bar*'
)
;
.
strictEqual
(
.
,
'\\# foo\n\n\\*bar\\*'
)
;
}
)
;
test
(
'appendLink'
,
function
(
)
{
function
assertLink
(
:
string
,
:
string
,
:
string
|
undefined
,
:
string
)
{
const
=
new
MarkdownString
(
)
;
.
appendLink
(
,
,
)
;
.
strictEqual
(
.
,
)
;
}
assertLink
(
'https://example.com\\()'
,
'hello'
,
undefined
,
'[hello](https://example.com\\(\\))'
)
;
assertLink
(
'https://example.com'
,
'hello'
,
'title'
,
'[hello](https://example.com "title")'
)
;
assertLink
(
'foo)'
,
'hello]'
,
undefined
,
'[hello\\]](foo\\))'
)
;
assertLink
(
'foo\\)'
,
'hello]'
,
undefined
,
'[hello\\]](foo\\))'
)
;
assertLink
(
'fo)o'
,
'hell]o'
,
undefined
,
'[hell\\]o](fo\\)o)'
)
;
assertLink
(
'foo)'
,
'hello]'
,
'title"'
,
'[hello\\]](foo\\) "title\\"")'
)
;
}
)
;
test
(
'lift'
,
(
)
=>
{
const
:
=
{
:
'hello'
,
:
URI
.
file
(
'/foo/bar'
)
,
:
true
,
:
true
,
:
true
,
:
{
[
URI
.
file
(
'/foo/bar2'
)
.
toString
(
)
]
:
URI
.
file
(
'/foo/bar2'
)
,
[
URI
.
file
(
'/foo/bar3'
)
.
toString
(
)
]
:
URI
.
file
(
'/foo/bar3'
)
}
}
;
const
=
.
lift
(
)
;
.
strictEqual
(
.
,
.
)
;
.
strictEqual
(
.
?.
toString
(
)
,
.
?.
toString
(
)
)
;
.
strictEqual
(
.
,
.
)
;
.
strictEqual
(
.
,
.
)
;
.
strictEqual
(
.
,
.
)
;
.
deepStrictEqual
(
.
,
.
)
;
}
)
;
test
(
'lift returns new instance'
,
(
)
=>
{
const
=
new
MarkdownString
(
'hello'
)
;
const
=
.
lift
(
)
.
appendText
(
'world'
)
;
.
strictEqual
(
.
,
'helloworld'
)
;
.
strictEqual
(
.
,
'hello'
)
;
}
)
;
suite
(
'appendCodeBlock'
,
(
)
=>
{
function
assertCodeBlock
(
:
string
,
:
string
,
:
string
)
{
const
=
new
MarkdownString
(
)
;
.
appendCodeblock
(
,
)
;
.
strictEqual
(
.
,
)
;
}
test
(
'common cases'
,
(
)
=>
{
assertCodeBlock
(
'ts'
,
'const a = 1;'
,
` \n ${ [
'```ts' ,
'const a = 1;' ,
'```'
] . join ( '\n' ) } \n `
)
;
assertCodeBlock
(
'ts'
,
'const a = `1`;'
,
` \n ${ [
'```ts' ,
'const a = `1`;' ,
'```'
] . join ( '\n' ) } \n `
)
;
}
)
;
test
(
'escape fence'
,
(
)
=>
{
assertCodeBlock
(
'md'
,
'```\n```'
,
` \n ${ [
'````md' ,
'```\n```' ,
'````'
] . join ( '\n' ) } \n `
)
;
assertCodeBlock
(
'md'
,
'\n\n```\n```'
,
` \n ${ [
'````md' ,
'\n\n```\n```' ,
'````'
] . join ( '\n' ) } \n `
)
;
assertCodeBlock
(
'md'
,
'```\n```\n````\n````'
,
` \n ${ [
'`````md' ,
'```\n```\n````\n````' ,
'`````'
] . join ( '\n' ) } \n `
)
;
}
)
;
}
)
;
suite
(
'ThemeIcons'
,
(
)
=>
{
suite
(
'Support On'
,
(
)
=>
{
test
(
'appendText'
,
(
)
=>
{
const
=
new
MarkdownString
(
undefined
,
{
:
true
}
)
;
.
appendText
(
'$(zap) $(not a theme icon) $(add)'
)
;
.
strictEqual
(
.
,
'\\\\$\\(zap\\) $\\(not a theme icon\\) \\\\$\\(add\\)'
)
;
}
)
;
test
(
'appendMarkdown'
,
(
)
=>
{
const
=
new
MarkdownString
(
undefined
,
{
:
true
}
)
;
.
appendMarkdown
(
'$(zap) $(not a theme icon) $(add)'
)
;
.
strictEqual
(
.
,
'$(zap) $(not a theme icon) $(add)'
)
;
}
)
;
test
(
'appendMarkdown with escaped icon'
,
(
)
=>
{
const
=
new
MarkdownString
(
undefined
,
{
:
true
}
)
;
.
appendMarkdown
(
'\\$(zap) $(not a theme icon) $(add)'
)
;
.
strictEqual
(
.
,
'\\$(zap) $(not a theme icon) $(add)'
)
;
}
)
;
}
)
;
suite
(
'Support Off'
,
(
)
=>
{
test
(
'appendText'
,
(
)
=>
{
const
=
new
MarkdownString
(
undefined
,
{
:
false
}
)
;
.
appendText
(
'$(zap) $(not a theme icon) $(add)'
)
;
.
strictEqual
(
.
,
'$\\(zap\\) $\\(not a theme icon\\) $\\(add\\)'
)
;
}
)
;
test
(
'appendMarkdown'
,
(
)
=>
{
const
=
new
MarkdownString
(
undefined
,
{
:
false
}
)
;
.
appendMarkdown
(
'$(zap) $(not a theme icon) $(add)'
)
;
.
strictEqual
(
.
,
'$(zap) $(not a theme icon) $(add)'
)
;
}
)
;
test
(
'appendMarkdown with escaped icon'
,
(
)
=>
{
const
=
new
MarkdownString
(
undefined
,
{
:
true
}
)
;
.
appendMarkdown
(
'\\$(zap) $(not a theme icon) $(add)'
)
;
.
strictEqual
(
.
,
'\\$(zap) $(not a theme icon) $(add)'
)
;
}
)
;
}
)
;
}
)
;
}
)
;