|
6 | 6 | <meta content="utf-8" http-equiv="encoding">
|
7 | 7 | <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
8 | 8 |
|
9 |
| - <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Roboto:300,600"> |
10 |
| - <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Roboto+Slab:300,600"> |
11 |
| - <link rel="stylesheet" type="text/css" href="css/index.css"> |
12 |
| - |
13 | 9 | <link rel="icon" type="image/png" href="./img/favicon_clear-16.png" sizes="16x16">
|
14 | 10 | <link rel="icon" type="image/png" href="./img/favicon_clear-32.png" sizes="32x32">
|
15 | 11 | <link rel="icon" type="image/png" href="./img/favicon_clear-256.png" sizes="256x256">
|
|
19 | 15 | <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/ace/1.1.01/ace.js" charset="utf-8"></script>
|
20 | 16 | <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/ace/1.1.01/mode-haskell.js"></script>
|
21 | 17 | <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/ace/1.1.01/theme-dawn.js"></script>
|
| 18 | + |
| 19 | + <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Roboto:300,600"> |
| 20 | + <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Roboto+Slab:300,600"> |
| 21 | + <link rel="stylesheet" type="text/css" href="css/index.css"> |
22 | 22 | </head>
|
23 | 23 | <body>
|
24 | 24 | <div id="wrapper">
|
|
157 | 157 | cleanupActions = [];
|
158 | 158 | }
|
159 | 159 |
|
160 |
| - function addErrorMarker(startLine, startColumn, endLine, endColumn) { |
| 160 | + function setAnnotations(annotations) { |
| 161 | + editor.session.setAnnotations(annotations); |
| 162 | + } |
| 163 | + |
| 164 | + function addMarker(type, startLine, startColumn, endLine, endColumn) { |
161 | 165 | if (startLine === endLine && endColumn <= startColumn) {
|
162 | 166 | // Make sure the range is at least one character wide.
|
163 | 167 | if (startColumn > 0) {
|
|
171 | 175 | var range = new(ace.require("ace/range").Range)
|
172 | 176 | (startLine - 1, startColumn - 1, endLine - 1, endColumn - 1);
|
173 | 177 |
|
174 |
| - var marker = editor.session.addMarker(range, "error", "text", true); |
175 |
| - |
176 |
| - editor.session.addGutterDecoration(startLine - 1, "gutter-error"); |
| 178 | + var marker = editor.session.addMarker(range, type, "text", true); |
177 | 179 |
|
178 |
| - cleanupActions.push((function(marker, line) { |
| 180 | + cleanupActions.push((function(marker) { |
179 | 181 | return function() {
|
180 | 182 | editor.session.removeMarker(marker);
|
181 |
| - editor.session.removeGutterDecoration(line, "gutter-error"); |
182 | 183 | };
|
183 |
| - })(marker, startLine - 1)); |
| 184 | + })(marker)); |
184 | 185 | }
|
185 | 186 |
|
186 | 187 | function setupIFrame($ctr, html, js, onReady) {
|
|
0 commit comments