How to automatically replace html lists with comma and semicolon separated lists

Please understand that I am VERY bad with scripting and I have tried to figure this out myself but I cannot.

I am using memento to generated cards but the dictionary definitions come in as lists like this:

HTML:

<div style="text-align: left;">
<ol>
 <li>
  <ul data-content="glossary">
   <li>securing</li>
   <li>obtaining</li>
   <li>ensuring</li>
   <li>guarantee</li>
   <li>maintaining</li>
  </ul>
 </li>
 <li>
  <ul data-content="glossary">
   <li>belay</li>
   <li>belaying</li>
  </ul>
 </li>
</ol>
</div>

The major meaning groups are in the ordered list and related terms are in an unordered list. But I want the definitions like this:

securing, obtaining, ensuring, guarantee, maintaining; belay, belaying

Here the major meaning groups are separated by semicolons and the related terms by commas.

I want to either

  1. stop any lists at all either by not allowing lists via CSS (I have tried this but failed) or not allow any HTML tags at all (also tried and failed)

OR

  1. to automatically convert the tags to commas and semicolons.

Any suggestions are appreciated.

Ok, nevermind. I found this reddit thread and realised I can use the find and replace function to replace the tags with commas and semicolons en masse.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.