<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="sr">
	<id>https://siwiki.rs/w/index.php?action=history&amp;feed=atom&amp;title=%D0%A1%D0%BF%D1%80%D0%B0%D0%B2%D0%B8%D1%86%D0%B0%3ADiagramGenerator%2Fsvg.js</id>
	<title>Справица:DiagramGenerator/svg.js - Историја измена</title>
	<link rel="self" type="application/atom+xml" href="https://siwiki.rs/w/index.php?action=history&amp;feed=atom&amp;title=%D0%A1%D0%BF%D1%80%D0%B0%D0%B2%D0%B8%D1%86%D0%B0%3ADiagramGenerator%2Fsvg.js"/>
	<link rel="alternate" type="text/html" href="https://siwiki.rs/w/index.php?title=%D0%A1%D0%BF%D1%80%D0%B0%D0%B2%D0%B8%D1%86%D0%B0:DiagramGenerator/svg.js&amp;action=history"/>
	<updated>2026-06-05T17:23:05Z</updated>
	<subtitle>Историја измена ове странице на пројекту</subtitle>
	<generator>MediaWiki 1.39.8</generator>
	<entry>
		<id>https://siwiki.rs/w/index.php?title=%D0%A1%D0%BF%D1%80%D0%B0%D0%B2%D0%B8%D1%86%D0%B0:DiagramGenerator/svg.js&amp;diff=5348&amp;oldid=prev</id>
		<title>KockaAdmiralac: Prosleđivanje grešaka i označavanje pogrešnih polja</title>
		<link rel="alternate" type="text/html" href="https://siwiki.rs/w/index.php?title=%D0%A1%D0%BF%D1%80%D0%B0%D0%B2%D0%B8%D1%86%D0%B0:DiagramGenerator/svg.js&amp;diff=5348&amp;oldid=prev"/>
		<updated>2023-02-04T20:32:12Z</updated>

		<summary type="html">&lt;p&gt;Prosleđivanje grešaka i označavanje pogrešnih polja&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;sr&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Старија измена&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Верзија на датум 4. фебруар 2023. у 22:32&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l162&quot;&gt;Ред 162:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ред 162:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         var offM = offL + columnWidth;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         var offM = offL + columnWidth;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         var offR = offM + columnWidth;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         var offR = offM + columnWidth;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         // &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Label&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         // &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Draw label.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         if (instruction.labels.length &amp;gt; 0) {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         if (instruction.labels.length &amp;gt; 0) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             // TODO: Support more than one label and also label wrapping&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             // TODO: Support more than one label and also label wrapping&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l172&quot;&gt;Ред 172:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ред 172:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             group.appendChild(createArrow(offL + 220, y + 13.75, offL + 200, y + 13.75));&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             group.appendChild(createArrow(offL + 220, y + 13.75, offL + 200, y + 13.75));&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         }&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         // &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Signals&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         // &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Draw signals.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         var &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;actions &lt;/del&gt;= &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;mw.libs.diagramGenerator&lt;/del&gt;.signalsToActions(instruction.signals);&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         var &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;actionsResult &lt;/ins&gt;= &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;lib&lt;/ins&gt;.signalsToActions(instruction.signals);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         var wrappedTextLeft = wrapText(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;actions&lt;/del&gt;, MAX_LINE_LENGTH, &amp;#039;, &amp;#039;);&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         var wrappedTextLeft = wrapText(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;actionsResult.result&lt;/ins&gt;, MAX_LINE_LENGTH, &amp;#039;, &amp;#039;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         var wrappedTextMiddle = wrapText(instruction.signals, MAX_LINE_LENGTH, &amp;#039;, &amp;#039;);&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         var wrappedTextMiddle = wrapText(instruction.signals, MAX_LINE_LENGTH, &amp;#039;, &amp;#039;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         var wrappedTextRightComment = instruction.comment.length &amp;gt; 0 ?&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         var wrappedTextRightComment = instruction.comment.length &amp;gt; 0 ?&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l189&quot;&gt;Ред 189:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ред 189:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         var rectHeight = yDiff + 10;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         var rectHeight = yDiff + 10;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         group.appendChild(createRect(offM, y, 200, rectHeight));&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         group.appendChild(createRect(offM, y, 200, rectHeight));&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;group.appendChild(&lt;/del&gt;createRect(offL, y, 200, rectHeight));&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;var leftRect = &lt;/ins&gt;createRect(offL, y, 200, rectHeight)&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;        if (!parameters.ignoreErrors &amp;amp;&amp;amp; actionsResult.errors.length &amp;gt; 0) {&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;            // Point out that an error happened to the user.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;            leftRect.setAttributeNS(SVG_NS, &amp;#039;fill-opacity&amp;#039;, &amp;#039;0.5&amp;#039;);&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;            leftRect.style.fill = &amp;#039;red&amp;#039;;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;        }&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;        group.appendChild(leftRect&lt;/ins&gt;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         group.appendChild(createArrow(offM + 100, y + rectHeight, offM + 100, y + rectHeight + arrowHeight));&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         group.appendChild(createArrow(offM + 100, y + rectHeight, offM + 100, y + rectHeight + arrowHeight));&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         group.appendChild(createArrow(offL + 100, y + rectHeight, offL + 100, y + rectHeight + arrowHeight));&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         group.appendChild(createArrow(offL + 100, y + rectHeight, offL + 100, y + rectHeight + arrowHeight));&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         y += rectHeight + arrowHeight;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         y += rectHeight + arrowHeight;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         // &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Condition&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         // &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Draw condition.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         switch (instruction.branchType) {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         switch (instruction.branchType) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             case lib.BranchType.BRADR:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             case lib.BranchType.BRADR:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l247&quot;&gt;Ред 247:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ред 253:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                 break;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                 break;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         }&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;        // Draw separator.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         var separator = createLine(parameters.margin, y, parameters.width - parameters.margin, y);&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         var separator = createLine(parameters.margin, y, parameters.width - parameters.margin, y);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         separator.setAttributeNS(SVG_NS, &amp;#039;stroke-dasharray&amp;#039;, &amp;#039;10,10&amp;#039;);&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         separator.setAttributeNS(SVG_NS, &amp;#039;stroke-dasharray&amp;#039;, &amp;#039;10,10&amp;#039;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         group.appendChild(separator);&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         group.appendChild(separator);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         return &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[&lt;/del&gt;group, y&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]&lt;/del&gt;;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         return &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;            errors: actionsResult.errors.map(function(error) {&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;                return lib.msg(&amp;#039;error-actions&amp;#039;, instruction.line, error);&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;            }),&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;            result: &lt;/ins&gt;group,&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;            y: &lt;/ins&gt;y&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;        }&lt;/ins&gt;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     }&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l280&quot;&gt;Ред 280:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ред 293:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         var pageHeight = height - 2 * margin - FIELDS.length * footerRowHeight;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         var pageHeight = height - 2 * margin - FIELDS.length * footerRowHeight;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         var currentY = margin + headerHeight;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         var currentY = margin + headerHeight;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;        var errors = [];&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         pageHeight -= currentY;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         pageHeight -= currentY;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         while (pageHeight &amp;gt; 0 &amp;amp;&amp;amp; instructions.length &amp;gt; 0) {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         while (pageHeight &amp;gt; 0 &amp;amp;&amp;amp; instructions.length &amp;gt; 0) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             var instruction = instructions.shift();&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             var instruction = instructions.shift();&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             var generationResult = generateInstructionDiagram(parameters, config, instruction, currentY);&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             var generationResult = generateInstructionDiagram(parameters, config, instruction, currentY);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             var heightDiff = generationResult&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[1] &lt;/del&gt;- currentY;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             var heightDiff = generationResult&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;.y &lt;/ins&gt;- currentY;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             currentY = generationResult&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[1]&lt;/del&gt;;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             currentY = generationResult&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;.y&lt;/ins&gt;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             pageHeight -= heightDiff;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             pageHeight -= heightDiff;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             if (pageHeight &amp;gt;= 0) {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             if (pageHeight &amp;gt;= 0) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                 group.appendChild(generationResult&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[0]&lt;/del&gt;);&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                 group.appendChild(generationResult&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;.result&lt;/ins&gt;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             } else {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             } else {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                 instructions.unshift(instruction);&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                 instructions.unshift(instruction);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             }&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;            errors = errors.concat(generationResult.errors);&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         }&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         FIELDS.forEach(function(row, rowIndex) {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         FIELDS.forEach(function(row, rowIndex) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l300&quot;&gt;Ред 300:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ред 315:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             });&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             });&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         });&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         });&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         return group;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         return &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;            errors: errors,&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;            result: &lt;/ins&gt;group&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;        }&lt;/ins&gt;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     }&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l325&quot;&gt;Ред 325:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ред 343:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     function getPages(parameters, config, instructions) {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     function getPages(parameters, config, instructions) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         var pages = [];&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         var pages = [];&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;        var errors = [];&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         while (instructions.length &amp;gt; 0) {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         while (instructions.length &amp;gt; 0) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pages.push(&lt;/del&gt;createPage(parameters, config, instructions));&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;var createPageResult = &lt;/ins&gt;createPage(parameters, config, instructions)&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;            pages.push(createPageResult.result);&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;            errors = errors.concat(createPageResult.errors&lt;/ins&gt;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         }&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         var numFieldRows = FIELDS.length;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         var numFieldRows = FIELDS.length;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l349&quot;&gt;Ред 349:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ред 370:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             fields[1][2].textContent += &amp;#039; &amp;#039; + (pageIndex + 1) + &amp;#039;/&amp;#039; + pages.length;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             fields[1][2].textContent += &amp;#039; &amp;#039; + (pageIndex + 1) + &amp;#039;/&amp;#039; + pages.length;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         });&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         });&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         return pages;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         return &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;            errors: errors,&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;            result: &lt;/ins&gt;pages&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;        }&lt;/ins&gt;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     }&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key si:diff::1.12:old-5286:rev-5348 --&gt;
&lt;/table&gt;</summary>
		<author><name>KockaAdmiralac</name></author>
	</entry>
	<entry>
		<id>https://siwiki.rs/w/index.php?title=%D0%A1%D0%BF%D1%80%D0%B0%D0%B2%D0%B8%D1%86%D0%B0:DiagramGenerator/svg.js&amp;diff=5286&amp;oldid=prev</id>
		<title>KockaAdmiralac: Modul za generisanje dijagrama u SVG formatu na osnovu parsiranog mikrokoda</title>
		<link rel="alternate" type="text/html" href="https://siwiki.rs/w/index.php?title=%D0%A1%D0%BF%D1%80%D0%B0%D0%B2%D0%B8%D1%86%D0%B0:DiagramGenerator/svg.js&amp;diff=5286&amp;oldid=prev"/>
		<updated>2023-02-04T02:58:55Z</updated>

		<summary type="html">&lt;p&gt;Modul za generisanje dijagrama u SVG formatu na osnovu parsiranog mikrokoda&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Нова страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;/* eslint {&amp;quot;max-statements&amp;quot;: [&amp;quot;error&amp;quot;, 100]} */&lt;br /&gt;
(function() {&lt;br /&gt;
    &amp;#039;use strict&amp;#039;;&lt;br /&gt;
    var lib = mw.libs.diagramGenerator;&lt;br /&gt;
    var MAX_LINE_LENGTH = 22;&lt;br /&gt;
    var SVG_NS = &amp;#039;http://www.w3.org/2000/svg&amp;#039;;&lt;br /&gt;
    var FIELDS = [&lt;br /&gt;
        [&amp;#039;Ime i prezime&amp;#039;, &amp;#039;Indeks&amp;#039;, &amp;#039;Potpis&amp;#039;],&lt;br /&gt;
        [&amp;#039;Naziv&amp;#039;, &amp;#039;Datum&amp;#039;, &amp;#039;Strana&amp;#039;]&lt;br /&gt;
    ];&lt;br /&gt;
&lt;br /&gt;
    function createRect(startX, startY, width, height) {&lt;br /&gt;
        var rect = document.createElementNS(SVG_NS, &amp;#039;rect&amp;#039;);&lt;br /&gt;
        rect.setAttributeNS(SVG_NS, &amp;#039;x&amp;#039;, startX);&lt;br /&gt;
        rect.setAttributeNS(SVG_NS, &amp;#039;y&amp;#039;, startY);&lt;br /&gt;
        rect.setAttributeNS(SVG_NS, &amp;#039;width&amp;#039;, width);&lt;br /&gt;
        rect.setAttributeNS(SVG_NS, &amp;#039;height&amp;#039;, height);&lt;br /&gt;
        rect.setAttributeNS(SVG_NS, &amp;#039;stroke-width&amp;#039;, &amp;#039;1&amp;#039;);&lt;br /&gt;
        rect.setAttributeNS(SVG_NS, &amp;#039;fill-opacity&amp;#039;, &amp;#039;0&amp;#039;);&lt;br /&gt;
        rect.style.stroke = &amp;#039;black&amp;#039;;&lt;br /&gt;
        return rect;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    function createConditionRect(startX, startY, width, height) {&lt;br /&gt;
        var rect = document.createElementNS(SVG_NS, &amp;#039;polygon&amp;#039;);&lt;br /&gt;
        var points = [&lt;br /&gt;
            [startX, startY + height / 2],&lt;br /&gt;
            [startX + width * 1 / 20, startY],&lt;br /&gt;
            [startX + width * 19 / 20, startY],&lt;br /&gt;
            [startX + width, startY + height / 2],&lt;br /&gt;
            [startX + width * 19 / 20, startY + height],&lt;br /&gt;
            [startX + width * 1 / 20, startY + height]&lt;br /&gt;
        ];&lt;br /&gt;
        rect.setAttributeNS(SVG_NS, &amp;#039;points&amp;#039;, points.map(function(point) {&lt;br /&gt;
            return point.join(&amp;#039;,&amp;#039;);&lt;br /&gt;
        }).join(&amp;#039; &amp;#039;));&lt;br /&gt;
        rect.style.fill = &amp;#039;none&amp;#039;;&lt;br /&gt;
        rect.style.stroke = &amp;#039;black&amp;#039;;&lt;br /&gt;
        return rect;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    function createTextLine(x, y, text) {&lt;br /&gt;
        var line = document.createElementNS(SVG_NS, &amp;#039;tspan&amp;#039;);&lt;br /&gt;
        line.textContent = text;&lt;br /&gt;
        line.setAttributeNS(SVG_NS, &amp;#039;x&amp;#039;, x);&lt;br /&gt;
        line.setAttributeNS(SVG_NS, &amp;#039;y&amp;#039;, y);&lt;br /&gt;
        return line;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    function wrapText(textSegments, maxLineLength, joinChar) {&lt;br /&gt;
        var lines = [];&lt;br /&gt;
        var currentLine = &amp;#039;&amp;#039;;&lt;br /&gt;
        textSegments.forEach(function(segment, index) {&lt;br /&gt;
            var segmentWithJoinChar = segment.trim();&lt;br /&gt;
            if (index !== textSegments.length - 1) {&lt;br /&gt;
                segmentWithJoinChar += joinChar;&lt;br /&gt;
            }&lt;br /&gt;
            if (segmentWithJoinChar.length + currentLine.length &amp;gt; maxLineLength &amp;amp;&amp;amp; currentLine.length &amp;gt; 0) {&lt;br /&gt;
                lines.push(currentLine);&lt;br /&gt;
                currentLine = &amp;#039;&amp;#039;;&lt;br /&gt;
            }&lt;br /&gt;
            currentLine += segmentWithJoinChar;&lt;br /&gt;
        });&lt;br /&gt;
        lines.push(currentLine);&lt;br /&gt;
        return lines;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    function createText(startX, startY, line) {&lt;br /&gt;
        var lines = typeof line === &amp;#039;string&amp;#039; ? [line] : line;&lt;br /&gt;
        var text = document.createElementNS(SVG_NS, &amp;#039;text&amp;#039;);&lt;br /&gt;
        text.setAttributeNS(SVG_NS, &amp;#039;x&amp;#039;, startX);&lt;br /&gt;
        text.setAttributeNS(SVG_NS, &amp;#039;y&amp;#039;, startY);&lt;br /&gt;
        text.setAttributeNS(SVG_NS, &amp;#039;alignment-baseline&amp;#039;, &amp;#039;middle&amp;#039;);&lt;br /&gt;
        text.setAttributeNS(SVG_NS, &amp;#039;font-family&amp;#039;, &amp;#039;monospace&amp;#039;);&lt;br /&gt;
        text.setAttributeNS(SVG_NS, &amp;#039;text-anchor&amp;#039;, &amp;#039;middle&amp;#039;);&lt;br /&gt;
        lines.forEach(function(currentLine, index) {&lt;br /&gt;
            text.appendChild(createTextLine(startX, startY + index * 15, currentLine));&lt;br /&gt;
        });&lt;br /&gt;
        return text;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    function createTextNotCentered(startX, startY, text) {&lt;br /&gt;
        var textNode = createText(startX, startY, text);&lt;br /&gt;
        textNode.removeAttribute(&amp;#039;text-anchor&amp;#039;);&lt;br /&gt;
        return textNode;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    function createLine(startX, startY, endX, endY) {&lt;br /&gt;
        var line = document.createElementNS(SVG_NS, &amp;#039;line&amp;#039;);&lt;br /&gt;
        line.setAttributeNS(SVG_NS, &amp;#039;x1&amp;#039;, startX);&lt;br /&gt;
        line.setAttributeNS(SVG_NS, &amp;#039;y1&amp;#039;, startY);&lt;br /&gt;
        line.setAttributeNS(SVG_NS, &amp;#039;x2&amp;#039;, endX);&lt;br /&gt;
        line.setAttributeNS(SVG_NS, &amp;#039;y2&amp;#039;, endY);&lt;br /&gt;
        line.style.stroke = &amp;#039;black&amp;#039;;&lt;br /&gt;
        return line;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    function createArrow(startX, startY, endX, endY) {&lt;br /&gt;
        var arrow = document.createElementNS(SVG_NS, &amp;#039;polygon&amp;#039;);&lt;br /&gt;
        var points = [[endX, endY], [endX, endY], [endX, endY]];&lt;br /&gt;
        if (startX === endX) {&lt;br /&gt;
            // Vertical&lt;br /&gt;
            points[0][0] -= 2.5;&lt;br /&gt;
            points[1][0] += 2.5;&lt;br /&gt;
            if (endY &amp;gt; startY) {&lt;br /&gt;
                // Down&lt;br /&gt;
                points[0][1] -= 2.5;&lt;br /&gt;
                points[1][1] -= 2.5;&lt;br /&gt;
            } else {&lt;br /&gt;
                // Up&lt;br /&gt;
                points[0][1] += 2.5;&lt;br /&gt;
                points[1][1] += 2.5;&lt;br /&gt;
            }&lt;br /&gt;
        } else {&lt;br /&gt;
            // Horizontal&lt;br /&gt;
            points[0][1] -= 2.5;&lt;br /&gt;
            points[1][1] += 2.5;&lt;br /&gt;
            if (endX &amp;gt; startX) {&lt;br /&gt;
                // Right&lt;br /&gt;
                points[0][0] -= 2.5;&lt;br /&gt;
                points[1][0] -= 2.5;&lt;br /&gt;
            } else {&lt;br /&gt;
                // Left&lt;br /&gt;
                points[0][0] += 2.5;&lt;br /&gt;
                points[1][0] += 2.5;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        arrow.setAttributeNS(SVG_NS, &amp;#039;points&amp;#039;, points.map(function(point) {&lt;br /&gt;
            return point.join(&amp;#039;,&amp;#039;);&lt;br /&gt;
        }).join(&amp;#039; &amp;#039;));&lt;br /&gt;
        arrow.style.fill = &amp;#039;black&amp;#039;;&lt;br /&gt;
        var group = document.createElementNS(SVG_NS, &amp;#039;g&amp;#039;);&lt;br /&gt;
        group.appendChild(createLine(startX, startY, endX, endY));&lt;br /&gt;
        group.appendChild(arrow);&lt;br /&gt;
        return group;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    function hasSelfBranch(instruction) {&lt;br /&gt;
        if (instruction.destination.startsWith(&amp;#039;madr&amp;#039;)) {&lt;br /&gt;
            return parseInt(instruction.destination.substring(4), 16) === instruction.address;&lt;br /&gt;
        }&lt;br /&gt;
        return instruction.labels.includes(instruction.destination);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    function fixConditionName(condition, conditions) {&lt;br /&gt;
        var properlyCasedName = conditions.find(function(condition2) {&lt;br /&gt;
            return condition2.toLowerCase() === condition.toLowerCase();&lt;br /&gt;
        }) || condition;&lt;br /&gt;
        if (properlyCasedName.startsWith(&amp;#039;#&amp;#039;)) {&lt;br /&gt;
            return &amp;#039;!&amp;#039; + properlyCasedName.substring(1);&lt;br /&gt;
        }&lt;br /&gt;
        return properlyCasedName;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    function generateInstructionDiagram(parameters, config, instruction, currentY) {&lt;br /&gt;
        var y = currentY;&lt;br /&gt;
        var arrowHeight = parameters.arrowHeight;&lt;br /&gt;
        var group = document.createElementNS(SVG_NS, &amp;#039;g&amp;#039;);&lt;br /&gt;
        var columnWidth = (parameters.width - 2 * parameters.margin) / 3;&lt;br /&gt;
        var columnOffset = (columnWidth - 200 - 100 - 20) / 2;&lt;br /&gt;
        var offL = parameters.margin + columnOffset;&lt;br /&gt;
        var offM = offL + columnWidth;&lt;br /&gt;
        var offR = offM + columnWidth;&lt;br /&gt;
        // Label&lt;br /&gt;
        if (instruction.labels.length &amp;gt; 0) {&lt;br /&gt;
            // TODO: Support more than one label and also label wrapping&lt;br /&gt;
            group.appendChild(createRect(offM + 220, y, 100, 27.5));&lt;br /&gt;
            group.appendChild(createRect(offL + 220, y, 100, 27.5));&lt;br /&gt;
            group.appendChild(createText(offM + 270, y + 17.5, instruction.labels[0]));&lt;br /&gt;
            group.appendChild(createText(offL + 270, y + 17.5, instruction.labels[0]));&lt;br /&gt;
            group.appendChild(createArrow(offM + 220, y + 13.75, offM + 200, y + 13.75));&lt;br /&gt;
            group.appendChild(createArrow(offL + 220, y + 13.75, offL + 200, y + 13.75));&lt;br /&gt;
        }&lt;br /&gt;
        // Signals&lt;br /&gt;
        var actions = mw.libs.diagramGenerator.signalsToActions(instruction.signals);&lt;br /&gt;
        var wrappedTextLeft = wrapText(actions, MAX_LINE_LENGTH, &amp;#039;, &amp;#039;);&lt;br /&gt;
        var wrappedTextMiddle = wrapText(instruction.signals, MAX_LINE_LENGTH, &amp;#039;, &amp;#039;);&lt;br /&gt;
        var wrappedTextRightComment = instruction.comment.length &amp;gt; 0 ?&lt;br /&gt;
            wrapText(instruction.comment.split(&amp;#039; &amp;#039;), columnWidth / 10, &amp;#039; &amp;#039;) :&lt;br /&gt;
            [];&lt;br /&gt;
        var wrappedTextRightLine = wrapText(instruction.line.split(&amp;#039;,&amp;#039;), columnWidth / 10, &amp;#039;, &amp;#039;);&lt;br /&gt;
        var wrappedTextRight = wrappedTextRightComment.concat(wrappedTextRightLine);&lt;br /&gt;
        var yDiffLeft = (wrappedTextLeft.length - 1) * 15 + 17.5;&lt;br /&gt;
        var yDiffMiddle = (wrappedTextMiddle.length - 1) * 15 + 17.5;&lt;br /&gt;
        var yDiff = Math.max(yDiffLeft, yDiffMiddle);&lt;br /&gt;
        group.appendChild(createText(offM + 100, y + 17.5, wrappedTextMiddle));&lt;br /&gt;
        group.appendChild(createText(offL + 100, y + 17.5, wrappedTextLeft));&lt;br /&gt;
        group.appendChild(createTextNotCentered(offR, y + 17.5, wrappedTextRight));&lt;br /&gt;
        var rectHeight = yDiff + 10;&lt;br /&gt;
        group.appendChild(createRect(offM, y, 200, rectHeight));&lt;br /&gt;
        group.appendChild(createRect(offL, y, 200, rectHeight));&lt;br /&gt;
        group.appendChild(createArrow(offM + 100, y + rectHeight, offM + 100, y + rectHeight + arrowHeight));&lt;br /&gt;
        group.appendChild(createArrow(offL + 100, y + rectHeight, offL + 100, y + rectHeight + arrowHeight));&lt;br /&gt;
        y += rectHeight + arrowHeight;&lt;br /&gt;
        // Condition&lt;br /&gt;
        switch (instruction.branchType) {&lt;br /&gt;
            case lib.BranchType.BRADR:&lt;br /&gt;
            case lib.BranchType.BROPR:&lt;br /&gt;
                group.appendChild(createText(offM + 100, y + 17.5, instruction.branchType));&lt;br /&gt;
                group.appendChild(createText(offL + 100, y + 17.5, instruction.branchType));&lt;br /&gt;
                group.appendChild(createConditionRect(offM, y, 200, 27.5));&lt;br /&gt;
                group.appendChild(createConditionRect(offL, y, 200, 27.5));&lt;br /&gt;
                y += 50;&lt;br /&gt;
                break;&lt;br /&gt;
            case lib.BranchType.CONDITIONAL:&lt;br /&gt;
                var conditions = lib.parseConditions(config);&lt;br /&gt;
                var conditionName = fixConditionName(instruction.condition, conditions);&lt;br /&gt;
                group.appendChild(createText(offM + 100, y + 17.5, conditionName));&lt;br /&gt;
                group.appendChild(createText(offL + 100, y + 17.5, conditionName));&lt;br /&gt;
                group.appendChild(createConditionRect(offM, y, 200, 27.5));&lt;br /&gt;
                group.appendChild(createConditionRect(offL, y, 200, 27.5));&lt;br /&gt;
                group.appendChild(createArrow(offM + 100, y + 27.5, offM + 100, y + 27.5 + arrowHeight));&lt;br /&gt;
                group.appendChild(createArrow(offL + 100, y + 27.5, offL + 100, y + 27.5 + arrowHeight));&lt;br /&gt;
                group.appendChild(createText(offM + 90, y + 27.5 + arrowHeight * 3 / 4, &amp;#039;0&amp;#039;));&lt;br /&gt;
                group.appendChild(createText(offL + 90, y + 27.5 + arrowHeight * 3 / 4, &amp;#039;0&amp;#039;));&lt;br /&gt;
                group.appendChild(createText(offM + 203, y + 10, &amp;#039;1&amp;#039;));&lt;br /&gt;
                group.appendChild(createText(offL + 203, y + 10, &amp;#039;1&amp;#039;));&lt;br /&gt;
                if (hasSelfBranch(instruction)) {&lt;br /&gt;
                    group.appendChild(createLine(offM + 200, y + 13.75, offM + 210, y + 13.75));&lt;br /&gt;
                    group.appendChild(createLine(offL + 200, y + 13.75, offL + 210, y + 13.75));&lt;br /&gt;
                    group.appendChild(createLine(offM + 210, y + 13.75, offM + 210, y - 20));&lt;br /&gt;
                    group.appendChild(createLine(offL + 210, y + 13.75, offL + 210, y - 20));&lt;br /&gt;
                    group.appendChild(createLine(offM + 210, y + 13.75, offM + 210, y - 20));&lt;br /&gt;
                    group.appendChild(createLine(offL + 210, y + 13.75, offL + 210, y - 20));&lt;br /&gt;
                    group.appendChild(createArrow(offM + 210, y - 20, offM + 200, y - 20));&lt;br /&gt;
                    group.appendChild(createArrow(offL + 210, y - 20, offL + 200, y - 20));&lt;br /&gt;
                } else {&lt;br /&gt;
                    group.appendChild(createArrow(offM + 200, y + 13.75, offM + 220, y + 13.75));&lt;br /&gt;
                    group.appendChild(createArrow(offL + 200, y + 13.75, offL + 220, y + 13.75));&lt;br /&gt;
                    group.appendChild(createRect(offM + 220, y, 100, 27.5));&lt;br /&gt;
                    group.appendChild(createRect(offL + 220, y, 100, 27.5));&lt;br /&gt;
                    group.appendChild(createText(offM + 270, y + 17.5, instruction.destination));&lt;br /&gt;
                    group.appendChild(createText(offL + 270, y + 17.5, instruction.destination));&lt;br /&gt;
                }&lt;br /&gt;
                y += 27.5 + arrowHeight;&lt;br /&gt;
            break;&lt;br /&gt;
            case lib.BranchType.UNCONDITIONAL:&lt;br /&gt;
                // TODO: Support label wrapping&lt;br /&gt;
                group.appendChild(createRect(offM + 50, y, 100, 27.5));&lt;br /&gt;
                group.appendChild(createRect(offL + 50, y, 100, 27.5));&lt;br /&gt;
                group.appendChild(createText(offM + 100, y + 17.5, instruction.destination));&lt;br /&gt;
                group.appendChild(createText(offL + 100, y + 17.5, instruction.destination));&lt;br /&gt;
                y += 40;&lt;br /&gt;
                break;&lt;br /&gt;
            default:&lt;br /&gt;
                // Do nothing.&lt;br /&gt;
                break;&lt;br /&gt;
        }&lt;br /&gt;
        var separator = createLine(parameters.margin, y, parameters.width - parameters.margin, y);&lt;br /&gt;
        separator.setAttributeNS(SVG_NS, &amp;#039;stroke-dasharray&amp;#039;, &amp;#039;10,10&amp;#039;);&lt;br /&gt;
        group.appendChild(separator);&lt;br /&gt;
        return [group, y];&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    function createPage(parameters, config, instructions) {&lt;br /&gt;
        var group = document.createElementNS(SVG_NS, &amp;#039;g&amp;#039;);&lt;br /&gt;
        var width = parameters.width;&lt;br /&gt;
        var height = parameters.height;&lt;br /&gt;
        var margin = parameters.margin;&lt;br /&gt;
        var headerHeight = parameters.headerHeight;&lt;br /&gt;
        var footerRowHeight = parameters.footerRowHeight;&lt;br /&gt;
        var pageWidth = width - 2 * margin;&lt;br /&gt;
        var columnWidth = pageWidth / 3;&lt;br /&gt;
        var columnHalfWidth = columnWidth / 2;&lt;br /&gt;
        group.append(createLine(margin, margin, width - margin, margin));&lt;br /&gt;
        group.append(createLine(margin, margin, margin, height - margin));&lt;br /&gt;
        group.append(createLine(width - margin, margin, width - margin, height - margin));&lt;br /&gt;
        group.append(createLine(margin, height - margin, width - margin, height - margin));&lt;br /&gt;
        group.append(createLine(margin, margin + headerHeight, width - margin, margin + headerHeight));&lt;br /&gt;
        group.append(createLine(margin, margin + headerHeight, width - margin, margin + headerHeight));&lt;br /&gt;
        group.append(createLine(margin + columnWidth, margin, margin + columnWidth, height - margin));&lt;br /&gt;
        group.append(createLine(margin + columnWidth * 2, margin, margin + columnWidth * 2, height - margin));&lt;br /&gt;
        group.append(createText(margin + columnHalfWidth, margin + 15, parameters.columnHeaderLeft));&lt;br /&gt;
        group.append(createText(margin + columnHalfWidth * 3, margin + 15, parameters.columnHeaderMiddle));&lt;br /&gt;
        group.append(createText(margin + columnHalfWidth * 5, margin + 15, parameters.columnHeaderRight));&lt;br /&gt;
        var lowerRowMargin = height - margin - footerRowHeight;&lt;br /&gt;
        var upperRowMargin = lowerRowMargin - footerRowHeight;&lt;br /&gt;
        group.append(createLine(margin, lowerRowMargin, width - margin, lowerRowMargin));&lt;br /&gt;
        group.append(createLine(margin, upperRowMargin, width - margin, upperRowMargin));&lt;br /&gt;
        var pageHeight = height - 2 * margin - FIELDS.length * footerRowHeight;&lt;br /&gt;
        var currentY = margin + headerHeight;&lt;br /&gt;
        pageHeight -= currentY;&lt;br /&gt;
        while (pageHeight &amp;gt; 0 &amp;amp;&amp;amp; instructions.length &amp;gt; 0) {&lt;br /&gt;
            var instruction = instructions.shift();&lt;br /&gt;
            var generationResult = generateInstructionDiagram(parameters, config, instruction, currentY);&lt;br /&gt;
            var heightDiff = generationResult[1] - currentY;&lt;br /&gt;
            currentY = generationResult[1];&lt;br /&gt;
            pageHeight -= heightDiff;&lt;br /&gt;
            if (pageHeight &amp;gt;= 0) {&lt;br /&gt;
                group.appendChild(generationResult[0]);&lt;br /&gt;
            } else {&lt;br /&gt;
                instructions.unshift(instruction);&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        FIELDS.forEach(function(row, rowIndex) {&lt;br /&gt;
            row.forEach(function(cell, columnIndex) {&lt;br /&gt;
                var textX = margin + columnIndex * columnWidth + 10;&lt;br /&gt;
                var textY = height - margin - (FIELDS.length - rowIndex - 0.5) * footerRowHeight;&lt;br /&gt;
                group.append(createTextNotCentered(textX, textY, cell + &amp;#039;:&amp;#039;));&lt;br /&gt;
            });&lt;br /&gt;
        });&lt;br /&gt;
        return group;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    function createSVG(width, height) {&lt;br /&gt;
        var svg = document.createElementNS(SVG_NS, &amp;#039;svg&amp;#039;);&lt;br /&gt;
        svg.setAttributeNS(SVG_NS, &amp;#039;width&amp;#039;, width);&lt;br /&gt;
        svg.setAttributeNS(SVG_NS, &amp;#039;height&amp;#039;, height);&lt;br /&gt;
        svg.setAttributeNS(SVG_NS, &amp;#039;viewBox&amp;#039;, &amp;#039;0 0 &amp;#039; + width + &amp;#039; &amp;#039; + height);&lt;br /&gt;
        svg.setAttributeNS(SVG_NS, &amp;#039;version&amp;#039;, &amp;#039;1.1&amp;#039;);&lt;br /&gt;
        svg.setAttribute(&amp;#039;xmlns:xlink&amp;#039;, &amp;#039;http://www.w3.org/1999/xlink&amp;#039;);&lt;br /&gt;
        svg.setAttribute(&amp;#039;xmlns&amp;#039;, SVG_NS);&lt;br /&gt;
        return svg;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    function createSVGWithPages(width, height, pages) {&lt;br /&gt;
        var svg = createSVG(width, pages.length * height);&lt;br /&gt;
        pages.forEach(function(page, pageIndex) {&lt;br /&gt;
            page.setAttributeNS(SVG_NS, &amp;#039;transform&amp;#039;, &amp;#039;translate(0, &amp;#039; + pageIndex * height + &amp;#039;)&amp;#039;);&lt;br /&gt;
            svg.appendChild(page);&lt;br /&gt;
        });&lt;br /&gt;
        return svg;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    function getPages(parameters, config, instructions) {&lt;br /&gt;
        var pages = [];&lt;br /&gt;
        while (instructions.length &amp;gt; 0) {&lt;br /&gt;
            pages.push(createPage(parameters, config, instructions));&lt;br /&gt;
        }&lt;br /&gt;
        var numFieldRows = FIELDS.length;&lt;br /&gt;
        var numFieldColumns = FIELDS[0].length;&lt;br /&gt;
        var numFields = numFieldRows * numFieldColumns;&lt;br /&gt;
        pages.forEach(function(page, pageIndex) {&lt;br /&gt;
            var fieldNodes = Array.prototype.slice.call(page.children, -numFields);&lt;br /&gt;
            var fields = [];&lt;br /&gt;
            for (var rowIndex = 0; rowIndex &amp;lt; numFieldRows; ++rowIndex) {&lt;br /&gt;
                var fieldRow = [];&lt;br /&gt;
                for (var columnIndex = 0; columnIndex &amp;lt; numFieldColumns; ++columnIndex) {&lt;br /&gt;
                    fieldRow.push(fieldNodes[rowIndex * numFieldColumns + columnIndex]);&lt;br /&gt;
                }&lt;br /&gt;
                fields.push(fieldRow);&lt;br /&gt;
            }&lt;br /&gt;
            var today = new Date();&lt;br /&gt;
            var formattedDate = today.getDate() + &amp;#039;. &amp;#039; + (today.getMonth() + 1) + &amp;#039;. &amp;#039; + today.getFullYear() + &amp;#039;.&amp;#039;;&lt;br /&gt;
            fields[0][0].textContent += &amp;#039; &amp;#039; + parameters.nameSurname;&lt;br /&gt;
            fields[0][1].textContent += &amp;#039; &amp;#039; + parameters.indexNum;&lt;br /&gt;
            fields[1][0].textContent += &amp;#039; &amp;#039; + parameters.subjectName;&lt;br /&gt;
            fields[1][1].textContent += &amp;#039; &amp;#039; + formattedDate;&lt;br /&gt;
            fields[1][2].textContent += &amp;#039; &amp;#039; + (pageIndex + 1) + &amp;#039;/&amp;#039; + pages.length;&lt;br /&gt;
        });&lt;br /&gt;
        return pages;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    window.mw = $.extend(true, window.mw, {&lt;br /&gt;
        libs: {&lt;br /&gt;
            diagramGenerator: {&lt;br /&gt;
                createSVG: createSVG,&lt;br /&gt;
                createSVGWithPages: createSVGWithPages,&lt;br /&gt;
                getPages: getPages&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    });&lt;br /&gt;
})();&lt;/div&gt;</summary>
		<author><name>KockaAdmiralac</name></author>
	</entry>
</feed>