View Single Post
Old 12-29-2023, 09:51 AM   #26
feuille
Connoisseur
feuille will become famous soon enoughfeuille will become famous soon enoughfeuille will become famous soon enoughfeuille will become famous soon enoughfeuille will become famous soon enoughfeuille will become famous soon enough
 
Posts: 55
Karma: 666
Join Date: May 2020
Location: Germany
Device: android smartphone + tablet
Customizing questions

Quote:
Originally Posted by Zillion_ View Post
Hello, may I suggest a feature enhancement ? Would it be possible to configure parameters for the plugin, e.g. the "wrap columns at" (default=60, I like to set it higher), Tab size, Context handling, etc.
Hello Zillion_,

wrap columns and tab size works as expected (see attached images with wraps at 60 resp. 100 Characters).

> Also, question: what's the difference in the context handling between plugin and htmldiff ?

Handling by htmldiff (quote from the documentation):

context and numlines are both optional keyword arguments. Set context to True when contextual differences are to be shown, else the default is False to show the full files. numlines defaults to 5. When context is True numlines controls the number of context lines which surround the difference highlights. When context is False numlines controls the number of lines which are shown before a difference highlight when using the “next” hyperlinks (setting to zero would cause the “next” hyperlinks to place the next difference highlight at the top of the browser without any leading context).
https://docs.python.org/3/library/difflib.html
Strategy is:
- Put diff without table body in new text blob with marker for revised table body
- Loop thru table body rows and build another text blob
- Replace marker in text blob 1 with text blob 2

Context handling by the plugin:

The plugin strips identical lines from the diff result, preserving n context lines (as set by user):

abc ...
[18 identical line(s).]
def...

BTW, there is a new version out (1.2.3).
Attached Thumbnails
Click image for larger version

Name:	brueder_60.png
Views:	73
Size:	51.0 KB
ID:	205473   Click image for larger version

Name:	brueder_100.png
Views:	54
Size:	56.0 KB
ID:	205474  
feuille is offline   Reply With Quote