feat(markdown-vetur): 支持生成 attributes.json 的 options 属性 (#8545)
* feat(markdown-vetur): 支持生成 attributes.json 的 options 属性 * fix(markdown-vetur): 没有可选值不添加 options 属性
This commit is contained in:
@@ -20,3 +20,9 @@ export function formatType(type: string) {
|
||||
export function normalizePath(path: string): string {
|
||||
return path.replace(/\\/g, '/');
|
||||
}
|
||||
|
||||
// `default` `primary` -> ['default', 'primary']
|
||||
export function formatOptions(options?: string) {
|
||||
if (!options) return []
|
||||
return options.replace(/`/g, '').split(' ')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user