feat(markdown-vetur): trim underline of type

This commit is contained in:
chenjiahan
2020-04-11 15:29:41 +08:00
parent 456fc99017
commit c9e7512809
4 changed files with 8 additions and 7 deletions
+2 -1
View File
@@ -12,8 +12,9 @@ export function removeVersion(str: string) {
}
// *boolean* -> boolean
// _boolean_ -> boolean
export function formatType(type: string) {
return type.replace(/\*/g, '');
return type.replace(/(^(\*|_))|((\*|_)$)/g, '');
}
export function normalizePath(path: string): string {