Skip to content

Commit 95f6840

Browse files
ashmindmarijnh
authored andcommitted
[powershell mode] Prepare for merge into CodeMirror repository
Added tests and fixed some issues uncovered by testing.
1 parent d0e82a7 commit 95f6840

File tree

4 files changed

+451
-366
lines changed

4 files changed

+451
-366
lines changed

mode/powershell/index.html

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,30 @@
33
<head>
44
<meta charset="utf-8">
55
<title>CodeMirror: Powershell mode</title>
6-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/4.3.0/codemirror.css">
7-
<link rel="stylesheet" href="tests.css">
8-
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/4.3.0/codemirror.js"></script>
6+
<link rel="stylesheet" href="../../doc/docs.css">
7+
<link rel="stylesheet" href="../../lib/codemirror.css">
8+
<script src="../../lib/codemirror.js"></script>
99
<script src="powershell.js"></script>
10+
<style>.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
1011
</head>
1112
<body>
12-
<h1>CodeMirror: Powershell mode</h1>
13+
<div id=nav>
14+
<a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
1315

14-
<div><textarea id="code" name="code">
16+
<ul>
17+
<li><a href="../../index.html">Home</a>
18+
<li><a href="../../doc/manual.html">Manual</a>
19+
<li><a href="https://github.com/codemirror/codemirror">Code</a>
20+
</ul>
21+
<ul>
22+
<li><a href="../index.html">Language modes</a>
23+
<li><a class=active href="#">JavaScript</a>
24+
</ul>
25+
</div>
26+
<article>
27+
<h2>PowerShell mode</h2>
28+
29+
<div><textarea id="code" name="code">
1530
# Number Literals
1631
0 12345
1732
12kb 12mb 12gB 12Tb 12PB 12L 12D 12lkb 12dtb
@@ -173,16 +188,17 @@ <h1>CodeMirror: Powershell mode</h1>
173188
X:
174189
Y:
175190
Z:</textarea></div>
176-
<script>
177-
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
178-
mode: "powershell",
179-
lineNumbers: true,
180-
indentUnit: 4,
181-
tabMode: "shift",
182-
matchBrackets: true
183-
});
184-
</script>
191+
<script>
192+
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
193+
mode: "powershell",
194+
lineNumbers: true,
195+
indentUnit: 4,
196+
tabMode: "shift",
197+
matchBrackets: true
198+
});
199+
</script>
185200

186-
<p><strong>MIME types defined:</strong> <code>text/x-powershell</code>.</p>
201+
<p><strong>MIME types defined:</strong> <code>application/x-powershell</code>.</p>
202+
</article>
187203
</body>
188204
</html>

0 commit comments

Comments
 (0)