Skip to content

Commit fc0440b

Browse files
committed
Include direction override and isolate characters in default specialChars regexp
Closes #6967
1 parent dc7e324 commit fc0440b

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
@@ -286,7 +286,7 @@ <h2>Configuration</h2>
286286
should be replaced by a
287287
special <a href="#option_specialCharPlaceholder">placeholder</a>.
288288
Mostly useful for non-printing special characters. The default
289-
is <code>/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/</code>.</dd>
289+
is <code>/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/</code>.</dd>
290290
<dt id="option_specialCharPlaceholder"><code><strong>specialCharPlaceholder</strong>: function(char) → Element</code></dt>
291291
<dd>A function that, given a special character identified by
292292
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\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g, (cm, val, old) => {
71+
option("specialChars", /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\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)