@marko/language-server 1.1.11 → 1.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1069,6 +1069,9 @@ function AttrName({
1069
1069
  documentation.value += `[More Info](${autocomplete.descriptionMoreURL})`;
1070
1070
  }
1071
1071
  }
1072
+ if (!attr.required) {
1073
+ label += "?";
1074
+ }
1072
1075
  completions.push({
1073
1076
  label,
1074
1077
  documentation: documentation.value ? documentation : void 0,
@@ -2335,15 +2338,9 @@ var ScriptService = {
2335
2338
  tsProject.host
2336
2339
  );
2337
2340
  const generated = extracted.toString();
2338
- const content = (() => {
2339
- try {
2340
- return prettier2.format(generated, {
2341
- parser: lang === import_language_tools17.ScriptLang.ts ? "typescript" : "babel"
2342
- });
2343
- } catch {
2344
- return generated;
2345
- }
2346
- })();
2341
+ const content = await prettier2.format(generated, {
2342
+ parser: lang === import_language_tools17.ScriptLang.ts ? "typescript" : "babel"
2343
+ }).catch(() => generated);
2347
2344
  return {
2348
2345
  language: lang === import_language_tools17.ScriptLang.ts ? "typescript" : "javascript",
2349
2346
  content