<commit_before>{% extends "base.html" %}

{% block title %}PML Code Checker{% endblock %}

{% block head %}
	{{ super() }}	
	<script src="//cdnjs.cloudflare.com/ajax/libs/ace/1.1.01/ace.js"></script>
	<link href="{{url_for('static', filename='css/editor.css')}}" rel="stylesheet">
	<script src="{{url_for('static', filename='js/editor.js')}}"></script>
{% endblock %}

{% block page_content %}
	{{super()}}
	<div class="panel panel-default">
		<div class="panel-heading">
			<h1 class ="panel-title">PML Code Checker</h1>
		</div>
		<div id="panel-body">
			<input type="text" name="code" id="code"/> 
			
			<!-- Editor -->
			<div id="editor"></div>
			<button type="submit" class="btn btn-primary" onclick="submitData({{ url_for('main.root_post') }})"id="submit">Submit</button>
		
			<form action="upload" method="post" enctype="multipart/form-data" id="send">
				<button type="submit" class="btn btn-primary" >Save</button>				
				<input type="file" name="file" id ="file"> 
				<input type="fileCode" name="fileCode" id ="fileCode"> 
			</form>  <br />
			<script>
				var textarea = $('#code');
				textarea.hide();
				var textarea2 = $('#fileCode');
				textarea2.hide();

				var editor = ace.edit("editor");
				editor.setTheme("ace/theme/chrome");
				editor.getSession().setMode("ace/mode/javascript");
				
				// Update text editor when there is a change
				editor.getSession().on('change', function () {
					textarea.val(editor.getSession().getValue());
					textarea2.val(editor.getSession().getValue());
				});

				textarea.val(editor.getSession().getValue());
				textarea2.val(editor.getSession().getValue());
			</script>
		</div>
	</div>
	<div class="panel panel-default">
		<div class="panel-heading">
			<h1 class ="panel-title">PML Code Result</h1>
		</div>
			<div id="result"></div>
		</div>	
	</div>
{% endblock %}
<commit_msg>Fixed files been saved in single line<commit_after>{% extends "base.html" %}

{% block title %}PML Code Checker{% endblock %}

{% block head %}
	{{ super() }}	
	<script src="//cdnjs.cloudflare.com/ajax/libs/ace/1.1.01/ace.js"></script>
	<link href="{{url_for('static', filename='css/editor.css')}}" rel="stylesheet">
	<script src="{{url_for('static', filename='js/editor.js')}}"></script>
{% endblock %}

{% block page_content %}
	{{super()}}
	<div class="panel panel-default">
		<div class="panel-heading">
			<h1 class ="panel-title">PML Code Checker</h1>
		</div>
		<div id="panel-body">
			<input type="text" name="code" id="code"/> 
			
			<!-- Editor -->
			<div id="editor"></div>
			<button type="submit" class="btn btn-primary" onclick="submitData({{ url_for('main.root_post') }})"id="submit">Submit</button>
		
			<form action="upload" method="post" enctype="multipart/form-data" id="send">
				<button type="submit" class="btn btn-primary" >Save</button>				
				<input type="file" name="file" id ="file"> 
    				<input type="hidden" name="fileCode" style="display: none;">

			</form>  <br />
			<script>
				var textarea = $('#code');
				textarea.hide();
				var textarea2 = $('input[name="fileCode"]');

				var editor = ace.edit("editor");
				editor.setTheme("ace/theme/chrome");
				editor.getSession().setMode("ace/mode/javascript");
				
				// Update text editor when there is a change
				editor.getSession().on('change', function () {
					textarea.val(editor.getSession().getValue());
					textarea2.val(editor.getSession().getValue());
				});

				textarea.val(editor.getSession().getValue());
				textarea2.val(editor.getSession().getValue());
			</script>
		</div>
	</div>
	<div class="panel panel-default">
		<div class="panel-heading">
			<h1 class ="panel-title">PML Code Result</h1>
		</div>
			<div id="result"></div>
		</div>	
	</div>
{% endblock %}

{'fraction_non_alphanumeric': 0.2177742193755004, 'fraction_numerical': 0.006138243928476114, 'mean_word_length': 3.9774236387782205, 'pattern_counts': {'":': 0, '<': 77, '<?xml version=': 0, '>': 77, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4716742', 'n_tokens_mistral': 1489, 'n_tokens_neox': 1247, 'n_words': 247}