BoldLists-Talk

Summary: Talk page for BoldLists.
Maintainer: CarlosAB
Users: (View? / Edit)

This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.

Comments

This tip/recipe generates invalid XHTML with embedded lists. For example:

# First
# Second
### Third
#### Fourth
  1. First
  2. Second
    1. Third
      1. Fourth

generates: (spaces added for readability)

<ol>
<li><span class="li">First
    <ol>
    <li><span class="li">Second
        <ol>
        <li><span class="li">Third</span></li>
        </ol>
        </span></li>
    </ol>
    </span></li>
</ol>

The W3C Validator complains about the <ol>s embedded in <span>s:

Line x, Column y: document type does not allow element "ol" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag

Could you please take a look? Thanks! - moisesbr March 27, 2015, at 12:57 PM

Try replacing "span" with "div" everywhere in the recipe code:

$BlockMarkups['ol'] = array('<ol><li><div class="li">',
  '</div></li><li><div class="li">',
  '</div></li></ol>',1);

$HTMLStylesFmt['boldlists'] = "
  div.li{font-weight:normal}
  ol>li{font-weight:bold}
";

Recipe enabled on this page and validates. --Petko April 11, 2015, at 06:09 PM

It works! Thanks, Petko! Quite simple change, indeed... I have updated the script and the recipe. moisesbr April 15, 2015, at 11:22 PM

Talk page for the BoldLists recipe (users?).