From 1f0c26b25a116a5427547ea3a247232f1b691137 Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 4 Jul 2016 14:39:20 +0800 Subject: [PATCH] Fix label colon with whitespace: `label="xx: "` --- components/form/FormItem.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/form/FormItem.jsx b/components/form/FormItem.jsx index 5e8e5523f6..117132cb3c 100644 --- a/components/form/FormItem.jsx +++ b/components/form/FormItem.jsx @@ -165,7 +165,7 @@ export default class FormItem extends React.Component { // remove user input colon let label = props.label; if (typeof label === 'string' && label.trim() !== '') { - label = props.label.replace(/:|:$/, ''); + label = props.label.replace(/[:|:]\s*$/, ''); } return props.label ? (