Skip to content

Commit b06b55a

Browse files
committed
Use private use area char for trailing newline marker
see #9, some tokenizers would split the marker (% is commonly modulus) This is not really a proper fix, but it improves things until a larger refactor fixes it properly (removing the marker entirely)
1 parent ccbfe51 commit b06b55a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

web/src/lib/components/diff/concise-diff-view.svelte.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ export type PatchLine = {
108108
newLineNo?: number;
109109
};
110110

111-
const noTrailingNewlineMarker: string = "%%" + ["PATCH", "ROULETTE", "NO", "TRAILING", "NEWLINE", "MARKER"].join("%") + "%%";
111+
const joiner = "\uE000";
112+
const noTrailingNewlineMarker: string = joiner + joiner + ["PATCH", "ROULETTE", "NO", "TRAILING", "NEWLINE", "MARKER"].join(joiner) + joiner + joiner;
112113

113114
enum LineProcessorState {
114115
CONTEXT,

0 commit comments

Comments
 (0)