<commit_before><!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<title>wkx - browser test</title>
	<meta name="description" content="">
	<meta name="viewport" content="width=device-width, initial-scale=1">

	<style>
		#examples td > pre:only-child { margin: 0; }
		#examples code.hljs, #functions code.hljs { background: transparent; padding: 0; }
		pre:last-child { margin-bottom: 0; }
	</style>

	<!--[if lt IE 9]>
		<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
		<script>window.html5 || document.write('<script src="js/vendor/html5shiv.js"><\/script>')</script>
	<![endif]-->

	<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
	<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/languages/bash.min.js"></script>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/languages/javascript.min.js"></script>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/languages/xml.min.js"></script>

	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/1.2.0/semantic.min.css">
	<script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/1.2.0/semantic.min.js"></script>

	<script src="peg-0.8.0.min.js"></script>
</head>

<body>
	<!--[if lt IE 7]>
		<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
	<![endif]-->

	<div class="one column page ui grid"><div class="column">

		<h1 class="ui header">
			Using <a href="https://www.npmjs.com/package/wkx"><code>wkx</code></a> in the Browser
		</h1>

		<div class="top attached ui segment">
			<p>To use <code>wkx</code> in a webpage, simply copy a built browser version from <code>dist/</code> into
				your project, and use a <code>script</code> tag to include it:</p>
			<pre><code class="html">&lt;script src=&quot;wkx.js&quot;&gt;&lt;/script&gt;</code></pre>

			<p>You may also use <a href="http://rawgit.com/">RawGit</a> as a CDN, so you don't need to copy
				<code>wkx</code> into your project:</p>
			<pre><code class="html">&lt;script src=&quot;https://cdn.rawgit.com/cschwarz/wkx/v0.0.3/dist/wkx.js&quot;&gt;&lt;/script&gt;</code></pre>

			<p>If you use <a href="http://browserify.org/">browserify</a> for your project, you can simply <code>npm
				install wkx --save</code>, and just require <code>wkx</code> as usual in
			your code.</p>

			<div class="ui divider"></div>

			<p>Regardless of which of the preceeding options you choose, using <code>wkx</code> in the browser will
				look the same:</p>
			<pre><code class="javascript">var wkx = require('wkx');</code></pre>
		</div>

		<h2 class="ui header">Code Samples:</h2>

		<table id="examples" class="very compact striped ui table">
			<thead>
				<tr><th>Code</th><th></th><th>Result</th></tr>
			</thead>
			<tbody>
				<tr><td><pre><code>enum bar</code></pre></td></tr>
				<tr><td><pre><code>enum bar { RED; BLUE; GREEN; } </code></pre></td></tr>
				<tr><td><pre><code>class foo</code></pre></td></tr>
				<tr><td><pre><code>class baz.foo</code></pre></td></tr>
				<tr><td><pre><code>class foo { id: int}</code></pre></td></tr>
				<tr><td><pre><code>class foo { void someMethod() }</code></pre></td></tr>
				<tr><td><pre><code>class foo { id: int &#x3C;&#x3C;PK,SK&#x3E;&#x3E;}</code></pre></td></tr>
				<tr><td><pre><code>class foo { meh: char[254] }</code></pre></td></tr>
				<tr><td><pre><code>class foo { meh: int {NULL} }</code></pre></td></tr>
				<tr><td><pre><code>class foo { meh: int {NULL} &#x3C;&#x3C;FK&#x3E;&#x3E; }</code></pre></td></tr>
				<tr><td><pre><code>class foo { meh: int {NOT NULL} }</code></pre></td></tr>
				<tr><td><pre><code>class region_property&#x3C;&#x3C;table&#x3E;&#x3E;{
  id: int &#x3C;&#x3C;PK,SK&#x3E;&#x3E;
  region_id: int &#x3C;&#x3C;FK&#x3E;&#x3E;
  property_idx: tinyint
  property_rule_id: int {null} &#x3C;&#x3C;FK&#x3E;&#x3E; 
  property_class_id: int &#x3C;&#x3C;FK&#x3E;&#x3E;
  property_name: string
  property_value: string
}</code></pre></td></tr>
			</tbody>
		</table>

		<h5 class="top attached ui header">Grammar used above:</h5>
		<pre id="grammar" class="bottom attached ui segment"><textarea rows="50" style="width:100%"></textarea></pre>
		
		<h5 class="top attached ui header">Helper functions used above:</h5>
		<pre id="functions" class="bottom attached ui segment"><code class="javascript"></code></pre>

	</div></div>

	<script>

	// Highlight all existing code blocks.
	hljs.configure({ tabReplace: '    ' });
	hljs.initHighlightingOnLoad();
	
	//$("#grammar code").load("https://cdn.rawgit.com/eldritch-fossicker/plantuml-js/use_core_pegjs/PlantUML.pegjs");
   $.ajax({
	   url : "https://cdn.rawgit.com/eldritch-fossicker/plantuml-js/use_core_pegjs/PlantUML.pegjs",
	   dataType: "text",
	   async: false,
	   success : function (data) {
		   $("#grammar textarea").text(data);
	   }
   });
    
	var grammar = $("#grammar textarea").text();
	var parser = PEG.buildParser(grammar);

	$('#examples > tbody > tr')
	.each(function() {
		var exampleCode = $('td:first > pre > code', this);

		try {
			// Build a function to execute the example code.<commit_msg>improvements to the test page.<commit_after><!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<title>plantuml-js - browser test</title>
	<meta name="description" content="">
	<meta name="viewport" content="width=device-width, initial-scale=1">

	<style>
		#examples td > pre:only-child { margin: 0; }
		#examples code.hljs, #functions code.hljs { background: transparent; padding: 0; }
		pre:last-child { margin-bottom: 0; }
	</style>

	<!--[if lt IE 9]>
		<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
		<script>window.html5 || document.write('<script src="js/vendor/html5shiv.js"><\/script>')</script>
	<![endif]-->

	<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
	<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/languages/bash.min.js"></script>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/languages/javascript.min.js"></script>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/languages/xml.min.js"></script>

	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/1.2.0/semantic.min.css">
	<script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/1.2.0/semantic.min.js"></script>

	<script src="peg-0.8.0.min.js"></script>
</head>

<body>
	<!--[if lt IE 7]>
		<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
	<![endif]-->

	<div class="one column page ui grid"><div class="column">

		<h1 class="ui header">
			Using <a href="https://github.com/eldritch-fossicker/plantuml-js"><code>plantuml-js</code></a>
		</h1>

		<div class="top attached ui segment">
			<p>To use <code>wkx</code> in a webpage, simply copy a built browser version from <code>dist/</code> into
				your project, and use a <code>script</code> tag to include it:</p>
			<pre><code class="html">&lt;script src=&quot;wkx.js&quot;&gt;&lt;/script&gt;</code></pre>

			<p>You may also use <a href="http://rawgit.com/">RawGit</a> as a CDN, so you don't need to copy
				<code>wkx</code> into your project:</p>
			<pre><code class="html">&lt;script src=&quot;https://cdn.rawgit.com/cschwarz/wkx/v0.0.3/dist/wkx.js&quot;&gt;&lt;/script&gt;</code></pre>

			<p>If you use <a href="http://browserify.org/">browserify</a> for your project, you can simply <code>npm
				install wkx --save</code>, and just require <code>wkx</code> as usual in
			your code.</p>

			<div class="ui divider"></div>

			<p>Regardless of which of the preceeding options you choose, using <code>wkx</code> in the browser will
				look the same:</p>
			<pre><code class="javascript">var wkx = require('wkx');</code></pre>
		</div>

		<h2 class="ui header">Code Samples:</h2>

		<table id="examples" class="very compact striped ui table">
			<thead>
				<tr><th>Code</th><th></th><th>Result</th></tr>
			</thead>
			<tbody>
				<tr><td><pre><code>enum bar</code></pre></td></tr>
				<tr><td><pre><code>enum bar { RED; BLUE; GREEN; }</code></pre></td></tr>
				<tr><td><pre><code>class foo</code></pre></td></tr>
				<tr><td><pre><code>class baz.foo</code></pre></td></tr>
				<tr><td><pre><code>class foo { id: int}</code></pre></td></tr>
				<tr><td><pre><code>class foo { void someMethod() }</code></pre></td></tr>
				<tr><td><pre><code>class foo { id: int &lt;&lt;PK,SK&gt;&gt;}</code></pre></td></tr>
				<tr><td><pre><code>class foo { meh: char[254] }</code></pre></td></tr>
				<tr><td><pre><code>class foo { meh: int {NULL} }</code></pre></td></tr>
				<tr><td><pre><code>class foo { meh: int {NULL} &lt;&lt;FK&gt;&gt; }</code></pre></td></tr>
				<tr><td><pre><code>class foo { meh: int {NOT NULL} }</code></pre></td></tr>
				<tr><td><pre><code>class region_property&lt;&lt;table&gt;&gt;{
  id: int &lt;&lt;PK,SK&gt;&gt;
  region_id: int &lt;&lt;FK&gt;&gt;
  property_idx: tinyint
  property_rule_id: int {null} &lt;&lt;FK&gt;&gt; 
  property_class_id: int &lt;&lt;FK&gt;&gt;
  property_name: string
  property_value: string
}</code></pre></td></tr>
			</tbody>
		</table>

		<h5 class="top attached ui header">Grammar used above:</h5>
		<pre id="grammar" class="bottom attached ui segment"><textarea rows="50" style="width:100%"></textarea></pre>
		
		<h5 class="top attached ui header">Helper functions used above:</h5>
		<pre id="functions" class="bottom attached ui segment"><code class="javascript"></code></pre>

	</div></div>

	<script>

	// Highlight all existing code blocks.
	hljs.configure({ tabReplace: '    ' });
	hljs.initHighlightingOnLoad();
	
	//$("#grammar code").load("https://cdn.rawgit.com/eldritch-fossicker/plantuml-js/use_core_pegjs/PlantUML.pegjs");
   $.ajax({
	   url : "PlantUML.pegjs",
	   dataType: "text",
	   async: false,
	   success : function (data) {
		   $("#grammar textarea").text(data);
	   }
   });
    
	var grammar = $("#grammar textarea").text();
	var parser = PEG.buildParser(grammar);

	$('#examples > tbody > tr')
	.each(function() {
		var exampleCode = $('td:first > pre > code', this);

		try {
			// Build a function to execute the example code.
{'fraction_non_alphanumeric': 0.2303056768558952, 'fraction_numerical': 0.013449781659388647, 'mean_word_length': 4.2407322654462245, 'pattern_counts': {'":': 0, '<': 473, '<?xml version=': 0, '>': 481, 'https://': 23, 'lorem ipsum': 0, 'www.': 1, 'xml': 2}, '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': '5466149', 'n_tokens_mistral': 4742, 'n_tokens_neox': 4236, 'n_words': 826}