Here at Novaworks, we often get requests for features to add to GoFiler. Our topic this week is a client request that I think is another good example of how to use Legato to do some HTML parsing and modification. The original request was to have a way to detect paragraphs within table cells with underlines (border-bottom property) or underline tags in them. It would be great to remove the underlines from the paragraphs and put them on the table cell with the paragraphs instead. This script will work with two selection modes in an HTML file: you can either drag-select the table cells on which you want to run it, or you can click in a cell and run the script without selecting anything. Our script takes the start of your selection and finds the previous table cell. Then, working from that point until the end of the current cell or your selection, it locates any paragraphs with underlines or underline tags. If it finds them, it removes them and puts them in the table cell instead.
Continue reading "LDC #63: Promoting Underlines To Table Cells" »