Skip to content

Commit e0c56c0

Browse files
enum deprecated style 2
1 parent 0f24fb4 commit e0c56c0

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

.docfx/template/ManagedReference.extension.js

+2-8
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,8 @@ function updateTypeModelData(model) {
5959
model.isDeprecated = true;
6060
}
6161

62-
if (model.isEnum && model.syntax?.content) {
63-
for (const content of model.syntax.content) {
64-
let value = new String(content.value);
65-
if (!value || value.search(/\[[\s\r\n]*Obsolete/) < 0)
66-
continue;
67-
68-
content.value = value.replaceAll(/\][\s\r\n]*/, '<br />');
69-
}
62+
if (model.isEnum && model.syntax?.content[0]?.value.search(/\[[\s\r\n]*Obsolete/) >= 0) {
63+
model.syntax.content[0].value = model.syntax.content[0].value.replaceAll(/\][\s\r\n]*/, '<br />');
7064
}
7165
}
7266
}

0 commit comments

Comments
 (0)