<commit_before><qseditor name="qseditor">
	<script src="./md2bbc/src/showdown.min.js"></script>
	<script src="./md2bbc/mkd.js"></script>
	<script src="./bbcode/bbcode.js"></script>

	<textarea id="qse-text"></textarea>
	<iframe sandbox id="qse-preview"></iframe>
	<button id="qse-switch-button">switch</button>
	<button id="qse-preview-button">preview</button>

	<script>
		qse = {
			'mode': "bbcode", // or "markdown"
			'parse': (new Showdown.converter(conv_opts)).makeBBCode,
			'preview': function(textares, preview){
				text = (this.mode == "markdown")?this.parse(textares.value):textares.value;
				preview.srcdoc = bbcode.render(text);
//				preview.srcdoc = XBBCODE.process({
//					'text': text,
//					'removeMisalignedTags': false,
//					'addInLineBreaks': false
//				}).html;
			},
			'init': function(){
				textares = document.getElementById('qse-text');
				preview = document.getElementById('qse-preview');
				switchb = document.getElementById('qse-switch-button');
				previewb = document.getElementById('qse-preview-button');

				switchb.onclick = function(){
					if(qse.mode == "bbcode"){
						qse.mode = "markdown";
					}else if(qse.mode == "markdown"){
						qse.mode = "bbcode";
					};
				};

				previewb.onclick = function(){<commit_msg>mode save to window.localStorage<commit_after><qseditor name="qseditor">
	<script src="./md2bbc/src/showdown.min.js"></script>
	<script src="./md2bbc/mkd.js"></script>
	<script src="./bbcode/bbcode.js"></script>

	<textarea id="qse-text"></textarea>
	<iframe sandbox id="qse-preview"></iframe>
	<button id="qse-switch-button">switch</button>
	<button id="qse-preview-button">preview</button>

	<script>
		qse = {
			'parse': (new Showdown.converter(conv_opts)).makeBBCode,
			'preview': function(textares, preview){
				text = (window.localStorage.getItem('qsemode') == "markdown")?this.parse(textares.value):textares.value;
				preview.srcdoc = bbcode.render(text);
//				preview.srcdoc = XBBCODE.process({
//					'text': text,
//					'removeMisalignedTags': false,
//					'addInLineBreaks': false
//				}).html;
			},
			'init': function(){
				textares = document.getElementById('qse-text');
				preview = document.getElementById('qse-preview');
				switchb = document.getElementById('qse-switch-button');
				previewb = document.getElementById('qse-preview-button');

				switchb.onclick = function(){
					if(window.localStorage.getItem('qsemode') == "bbcode"){
						window.localStorage.setItem('qsemode', "markdown");
					}else if(window.localStorage.getItem('qsemode') == "markdown"){
						window.localStorage.setItem('qsemode', "bbcode");
					};
				};

				previewb.onclick = function(){
{'fraction_non_alphanumeric': 0.19311377245508982, 'fraction_numerical': 0.0014970059880239522, 'mean_word_length': 4.043396226415094, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, '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': '4841401', 'n_tokens_mistral': 1074, 'n_tokens_neox': 909, 'n_words': 130}