mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
WEB-25894 TSLint config: documentation text for no-reference is shown incorrectly
json schema: escape description text so that html symbols be shown correctly in documentation text
This commit is contained in:
@@ -55,7 +55,7 @@ public class JsonBySchemaDocumentationProvider implements DocumentationProvider
|
||||
if (value instanceof JsonObject) {
|
||||
final JsonProperty description = ((JsonObject)value).findProperty("description");
|
||||
if (description != null && description.getValue() instanceof JsonStringLiteral) {
|
||||
return StringUtil.unquoteString(description.getValue().getText());
|
||||
return StringUtil.escapeXml(StringUtil.unquoteString(description.getValue().getText()));
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -28,4 +28,8 @@ public class JsonSchemaDocumentationTest extends JsonBySchemaDocumentationBaseTe
|
||||
public void testSecondLevel() throws Exception {
|
||||
doTest(true, "json");
|
||||
}
|
||||
|
||||
public void testCheckEscaping() throws Exception {
|
||||
doTest(true, "json");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
Disallows /// <reference path=> imports (use ES6-style imports instead)
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"<caret>no-reference": 1
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"properties": {
|
||||
"no-reference": {
|
||||
"description": "Disallows /// <reference path=> imports (use ES6-style imports instead)"
|
||||
},
|
||||
"my_property2": {
|
||||
"description": "my property description 2"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user