Highlight the differences between two strings in terms of substitutions, insertions and deletions.

hl_str_diff(
  x,
  y,
  bs = "dodgerblue",
  bi = "darkgreen",
  bd = "firebrick",
  fs = "white",
  fi = "white",
  fd = "white",
  ...
)

Arguments

x, y

each argument is a single string. vectors of strings not currently supported.

fs, bs, fi, bi, fd, bd

the (f)oreground and (b)ackground colouring for string (s)ubstitutions, (i)insertions and (d)eletions.

...

further arguments passed to adist()

Value

list of 'emphatic' objects which could be renderd to ANSI or HTML