macmillanpublishers / htmlmaker_js

Repo for testing and finalizing htmlmaker javascript implementation
0 stars 1 forks source link

Convert list paras to real lists #7

Closed nelliemckesson closed 7 years ago

nelliemckesson commented 7 years ago

Bulleted and numbered list paragraphs should be converted to real lists. You'll need to handle two levels of lists. You'll need to wrap the contiguous list items in the appropriate list type (ol for numbered, ul for bulleted), and wrap the list paragraphs themselves in li items. You want the preserve the p element inside the li, though; so, for example, you'll have:

<ul>
  <li class="ListUnnumul">
    <p class="ListUnnumul">This is a list item.</p>
  </li>
</ul>

Level one: https://github.com/macmillanpublishers/bookmaker/blob/master/core/htmlmaker/wordtohtml.xsl#L169

Level two: https://github.com/macmillanpublishers/bookmaker/blob/master/core/htmlmaker/wordtohtml.xsl#L185

Original handling: https://github.com/macmillanpublishers/bookmaker/blob/master/core/htmlmaker/wordtohtml.xsl#L630

nelliemckesson commented 7 years ago

Done and tested