Skip to content

Commit b281258

Browse files
committed
chore(rich-markdown-editor): drop useless String.raw in highlight.ts
biome 2.0's noUselessStringRaw flags HIGHLIGHT_BODY — its pattern has no escape sequences, so String.raw is equivalent to a plain template literal (byte-identical value; interpolated into the other String.raw regexes unchanged). Pre-existing on staging; the repo-wide lint gate blocks CI on it.
1 parent add16c0 commit b281258

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor

apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/highlight.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { Plugin } from '@tiptap/pm/state'
1313
* (`=(?!=)`) but never `==`, so a highlight over text containing `=` (e.g. `==a=b==`) round-trips while
1414
* the closing `==` still terminates the run.
1515
*/
16-
const HIGHLIGHT_BODY = String.raw`(?:[^=]|=(?!=))+?`
16+
const HIGHLIGHT_BODY = `(?:[^=]|=(?!=))+?`
1717
const HIGHLIGHT_TOKEN = new RegExp(String.raw`^==(?!\s)(${HIGHLIGHT_BODY})(?<!\s)==`)
1818
/** Input/paste rule form (anchored on a preceding boundary) so typing `==x==` toggles the mark. */
1919
const HIGHLIGHT_INPUT = new RegExp(String.raw`(?:^|\s)(==(?!\s)(${HIGHLIGHT_BODY})(?<!\s)==)$`)

0 commit comments

Comments
 (0)