From b7a3f107c60a3b5e900a477344f25d6df01490a3 Mon Sep 17 00:00:00 2001 From: Nick Tilden Date: Mon, 14 Nov 2016 11:20:08 -0600 Subject: [PATCH] :bug: fix CI error and add character spacing to label --- lib/form/html.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/form/html.js b/lib/form/html.js index 3ac3a8d..e4026e9 100644 --- a/lib/form/html.js +++ b/lib/form/html.js @@ -108,6 +108,7 @@ const addRequired = (html, input, index) => { // regex to search for `for` const reFor = new RegExp(`(${stringFor})`); + render = render.replace(reFor, `for="${inp.id}"`); // add required to input const reName = new RegExp(`name=['"]\\s*${inp.name}\\s*['"]`); @@ -115,7 +116,7 @@ const addRequired = (html, input, index) => { // Add required text to label const reLabel = new RegExp(''); - render = render.replace(reLabel, `required to ${required}`); + render = render.replace(reLabel, `\srequired to ${required}`); } });