Skip to content

Commit 58df150

Browse files
committed
Also add u+fff9-u+fffb as special characters
Browser don't display anything for them either Issue #5900
1 parent 8aa23d7 commit 58df150

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

doc/manual.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ <h2>Configuration</h2>
284284
should be replaced by a
285285
special <a href="#option_specialCharPlaceholder">placeholder</a>.
286286
Mostly useful for non-printing special characters. The default
287-
is <code>/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff\ufffc]/</code>.</dd>
287+
is <code>/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/</code>.</dd>
288288
<dt id="option_specialCharPlaceholder"><code><strong>specialCharPlaceholder</strong>: function(char) → Element</code></dt>
289289
<dd>A function that, given a special character identified by
290290
the <a href="#option_specialChars"><code>specialChars</code></a>

src/edit/options.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export function defineOptions(CodeMirror) {
6868
for (let i = newBreaks.length - 1; i >= 0; i--)
6969
replaceRange(cm.doc, val, newBreaks[i], Pos(newBreaks[i].line, newBreaks[i].ch + val.length))
7070
})
71-
option("specialChars", /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff\ufffc]/g, (cm, val, old) => {
71+
option("specialChars", /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g, (cm, val, old) => {
7272
cm.state.specialChars = new RegExp(val.source + (val.test("\t") ? "" : "|\t"), "g")
7373
if (old != Init) cm.refresh()
7474
})

0 commit comments

Comments
 (0)