File tree Expand file tree Collapse file tree 3 files changed +16
-14
lines changed
sites/svelte-5-preview/src/lib Expand file tree Collapse file tree 3 files changed +16
-14
lines changed Original file line number Diff line number Diff line change 25
25
{autocomplete}
26
26
diagnostics= {() => {
27
27
if (error) {
28
- return [{
29
- severity: ' error' ,
30
- from: error .position [0 ],
31
- to: error .position [1 ],
32
- message: error .message
33
- }];
28
+ return [
29
+ {
30
+ severity: ' error' ,
31
+ from: error .position [0 ],
32
+ to: error .position [1 ],
33
+ message: error .message
34
+ }
35
+ ];
34
36
}
35
37
36
38
if (warnings) {
37
39
return warnings .map ((warning ) => ({
38
40
severity: ' warning' ,
39
41
from: warning .start .character ,
40
42
to: warning .end .character ,
41
- message: warning .message ,
43
+ message: warning .message
42
44
}));
43
45
}
44
46
Original file line number Diff line number Diff line change 38
38
if (selected .type === ' json' ) {
39
39
js_editor .set ({ code: ` /* Select a component to see its compiled code */` , lang: ' js' });
40
40
css_editor .set ({ code: ` /* Select a component to see its compiled code */` , lang: ' css' });
41
- }
42
-
43
- else if (selected .type === ' md' ) {
41
+ } else if (selected .type === ' md' ) {
44
42
markdown = marked (selected .source );
45
- }
46
-
47
- else if (compiled) {
43
+ } else if (compiled) {
48
44
js_editor .set ({ code: compiled .result .js , lang: ' js' });
49
45
css_editor .set ({ code: compiled .result .css , lang: ' css' });
50
46
}
Original file line number Diff line number Diff line change 325
325
>
326
326
< section slot= " a" >
327
327
< ComponentSelector show_modified= {showModified} on: add on: remove / >
328
- < ModuleEditor {autocomplete} error= {compiled? .result .error } warnings= {compiled? .result .warnings ?? []} / >
328
+ < ModuleEditor
329
+ {autocomplete}
330
+ error= {compiled? .result .error }
331
+ warnings= {compiled? .result .warnings ?? []}
332
+ / >
329
333
< / section>
330
334
331
335
< section slot= " b" style= " height: 100%;" >
You can’t perform that action at this time.
0 commit comments