We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a38ad14 commit 3b65820Copy full SHA for 3b65820
1 file changed
pages/textdiff/index.html
@@ -39,6 +39,7 @@
39
class DiffManager {
40
static segmentText(text, mode = 'line') {
41
if (mode === 'line') return text.split(/\n/);
42
+ if (mode === 'char') return text.split("");
43
const lang = LangDetect.detect(text);
44
const segmenter = new Intl.Segmenter(lang, {
45
granularity: mode === 'word' ? 'word' : 'sentence'
@@ -170,6 +171,7 @@ <h2 class="text-lg font-bold">History</h2>
170
171
<option value="line">Line</option>
172
<option value="sentence">Sentence</option>
173
<option value="word">Word</option>
174
+ <option value="char">Char</option>
175
</select>
176
<span id="score" class="ml-auto text-sm text-gray-400"></span>
177
</div>
0 commit comments