DiffIgnore

DiffIgnore

is an option to Diff and related functions that specifies what elements to ignore when computing diffs.

Details

  • DiffIgnore{elem1,elem2,} will ignore the given elements when computing the diffs.
  • When comparing notebooks or cells, supported elements include:
  • "BoxOptions"ignore all box options
    "CellOptions"ignore all cell options
    "CellStyles"ignore all cell styles
    "InlineCellOptions"ignore all inline cell options
    "InlineCellStyles"ignore all inline cell styles
    "NotebookOptions"ignore all notebook options
    elem{item1,item2,}ignore particular option names or styles for the given element

Examples

open allclose all

Basic Examples  (3)

When comparing cells, Diff will find any style and option changes in addition to content changes:

Use DiffIgnore to ignore all style and option changes:

Use DiffIgnore to ignore specific cell options:

When comparing notebooks, Diff will include notebook option changes:

Use DiffIgnore to ignore specific notebook options:

Possible Issues  (1)

Construct notebook expressions to compare:

Ignoring the cell option ExpressionUUID may result in differently aligned results:

Wolfram Research (2024), DiffIgnore, Wolfram Language function, https://reference.wolfram.com/language/ref/DiffIgnore.html.

Text

Wolfram Research (2024), DiffIgnore, Wolfram Language function, https://reference.wolfram.com/language/ref/DiffIgnore.html.

CMS

Wolfram Language. 2024. "DiffIgnore." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/DiffIgnore.html.

APA

Wolfram Language. (2024). DiffIgnore. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DiffIgnore.html

BibTeX

@misc{reference.wolfram_2024_diffignore, author="Wolfram Research", title="{DiffIgnore}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/DiffIgnore.html}", note=[Accessed: 12-October-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_diffignore, organization={Wolfram Research}, title={DiffIgnore}, year={2024}, url={https://reference.wolfram.com/language/ref/DiffIgnore.html}, note=[Accessed: 12-October-2024 ]}