diff --git a/src/main/webapp/WEB-INF/views/todo/todo_form.jsp b/src/main/webapp/WEB-INF/views/todo/todo_form.jsp index 6302a56..3b7a7c3 100644 --- a/src/main/webapp/WEB-INF/views/todo/todo_form.jsp +++ b/src/main/webapp/WEB-INF/views/todo/todo_form.jsp @@ -28,13 +28,9 @@ }); function getContentType(content){ - let newContent = content.replace(' ',''); - let slashType = newContent.indexOf(('/')); - let leftGaulho = newContent.indexOf('('); - let rightGaulho = newContent.indexOf(')'); - //TODO : 슬래시 기준으로 좌우측에 괄호가 있는지 체크해야함 - //TODO : 완성 아님 아직 - if( slashType != -1 && leftGaulho != -1 && rightGaulho != -1){ + let exg = /\( *[1-9]+[0-9]* *\/ *[1-9]+[0-9]* *\)/; + + if( exg.test(content)){ return 'stack'; }else{ return 'normal' @@ -97,7 +93,6 @@ $img.removeClass("leafCheck"); $img.hasClass("leafHide"); $img.hide(); - }else{ $img.removeClass("leafHide"); $img.addClass("leafCheck"); @@ -356,6 +351,7 @@ let $divCol = $("