WireTextTools::diffMarkup() method

Given two strings ($old and $new) return a diff string in HTML markup

Available since version 3.0.144.

Usage

// basic usage
$string = $wireTextTools->diffMarkup(string $old, string $new);

// usage with all arguments
$string = $wireTextTools->diffMarkup(string $old, string $new, array $options = []);

Arguments

NameType(s)Description
oldstring

Old string value

newstring

New string value

options (optional)array

Options to modify behavior:

  • ins (string) Markup to use for diff insertions (default: <ins>{out}</ins>)
  • del (string) Markup to use for diff deletions (default: <del>{out}</del>)
  • entityEncode (bool): Entity encode values, other than added ins/del tags? (default=true)
  • split (string): Regex used to split strings for parts to diff (default=\s+)

Return value

string


WireTextTools methods and properties

API reference based on ProcessWire core version 3.0.163

Twitter updates

  • Quick weekly update covering this week's commits for the upcoming 3.0.167 ProcessWire core version— More
    18 September 2020
  • This week ProcessWire version 3.0.166 is released on the dev branch. In this post we’ll cover all that’s new relative to the previous version, 3.0.165. Plus we’ll check out the latest new versions of ProCache and FormBuilder— More
    11 September 2020
  • Weekly update – 28 August 2020 – New secure files option defined per-template: More
    28 August 2020

Latest news

  • ProcessWire Weekly #332
    In the 332nd issue of ProcessWire Weekly we'll cover the latest core updates, introduce some new and updated ProcessWire resources, and more. Read on!
    Weekly.pw / 19 September 2020
  • ProcessWire 3.0.166 core updates and more
    This week ProcessWire version 3.0.166 is released on the dev branch. In this post we’ll cover all that’s new relative to the previous version, 3.0.165. Plus we’ll check out the latest new versions of ProCache and FormBuilder.
    Blog / 11 September 2020
  • Subscribe to weekly ProcessWire news

“…building with ProcessWire was a breeze, I really love all the flexibility the system provides. I can’t imagine using any other CMS in the future.” —Thomas Aull