Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • ahh! so wrapped all the way around then! what do you do if you have a validly positioned <dt>...</dt> pair but which is not followed by a validly positioned <dd>...</dd> pair? Commented Dec 8, 2015 at 5:57
  • This script as written won't put out the </dl> except after a <dd>. Commented Dec 8, 2015 at 6:02
  • thats probably correct - i dunno. i would consider it more correct than the other way - but i dunno know how all that tag stuff works. its why i asked (you and the asker) - i wanna do an answer. thank you. oh. but - well - you mean you possibly do the <dl> without the </dl>? i dunno about that.... hm. well. youve got my vote already anyway. shucks. in truth - i didnt even consider the ramifications of that - just that i didnt know if the </dl> should go before the trailing <dt>... Commented Dec 8, 2015 at 6:03
  • 2
    The tags are <dl>: definition list, <dt> definition term, <dd> definition data (or definition). I think they want to wrap the <dt>/<dd> sequences with <dl>. On fragments of html in a wiki, we don't really need to be too concerned with the greater xml/html context/validity. So I scripted this to the given input data. If there's a case of <dt> not folowed by <dd>, that would require changes, though it's completely doable. If the answers handle cases not in the sample data, I think it gets too complex and confusing. I hope that helps. Commented Dec 8, 2015 at 6:28
  • Outstanding. Thanks for the comments as well, I had no idea about the branch thing in sed. Commented Dec 13, 2015 at 2:40