Skip to content

Instantly share code, notes, and snippets.

@urstory
Created January 19, 2016 07:23

Revisions

  1. urstory created this gist Jan 19, 2016.
    36 changes: 36 additions & 0 deletions deletelinenumber.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,36 @@
    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>linenumber</title>
    <script src="https://code.jquery.com/jquery-1.11.3.js"></script>
    <script>
    $(function(){
    $("#changeBtn").click(function() {
    var source = $("#source").val();
    var lineArray = source.split("\n");
    var str = '';
    $.each(lineArray, function(index, line){
    var num = line.indexOf(": ", 0);
    if(num != -1){
    line = line.substring(num + 2);
    }
    str += line + "\n";
    });
    $("#destination").val(str);
    });
    });
    </script>
    </head>
    <body>
    <h1>소스코드 라인넘버 삭제</h1>
    <br>
    <textarea id="source" cols="70" rows="7"></textarea>
    <br>
    <br>
    <input type="button" id="changeBtn" value="소스변환"/>
    <br>
    <br>
    <textarea id="destination" cols="70" rows="7"></textarea>
    </body>
    </html>