Skip to contents

This function compares two texts and returns whether they are identical or a diff object from diffobj to visualize the differences in HTML. Used in conjunction with the run grammar checker Shiny app.

Usage

compare_text(original_text, modified_text)

Arguments

original_text

A character string representing the original text.

modified_text

A character string representing the modified text.

Value

Either "identical" if the two texts are identical, or a diff object showing the differences between the two texts.