Escape pipes in rule default values

- This was breaking the tables for rules such as Java's
`EmptyCatchBlock`
This commit is contained in:
Juan Martín Sotuyo Dodero
2018-04-09 03:21:28 -03:00
parent d300dc460f
commit 2f5501cc06

View File

@ -427,7 +427,7 @@ public class RuleDocGenerator {
+ description.substring(DEPRECATED_RULE_PROPERTY_MARKER.length());
}
lines.add("|" + propertyDescriptor.name()
+ "|" + (propertyDescriptor.defaultValue() != null ? String.valueOf(propertyDescriptor.defaultValue()) : "")
+ "|" + (propertyDescriptor.defaultValue() != null ? String.valueOf(propertyDescriptor.defaultValue()) : "").replace("|", "\\|")
+ "|" + description
+ "|");
}