Difflib for formatted text

52 views Asked by At

I'm currently using python's difflib to compute opcodes needed to transform one block of text to another block of text. The opcodes are then used in VBA to apply the transformation.

This works well with plain text. However, when I use rich text (formatted), the opcodes don't seem to line up as they are calculated using plain text and then applied on rich text.

Is there a way to feed rich text with formatting into python's difflib and calculate opcodes with that? What are my other options?

0

There are 0 answers