Geoffrey Sneddon  committed f6b1efb

Fix case when empty @id could be created.

  • Participants
  • Parent commits b5af9cd
  • Branches default

Comments (0)

Files changed (3)

File anolislib/

             source = u"generatedID"
         source = non_ifragment.sub(u"-", source).strip(u"-")
+        if source == u"":
+            source = u"generatedID"
     # Initally set the id to the source
     id = source

File tests/basic/html5-id-hypen.html

+<!DOCTYPE html><head><meta charset=utf-8><h1>Foo</h1>
+<h2 id=generatedID><span class=secno>1 </span>-</h2>

File tests/basic/html5-id-hypen.src.html

+<!doctype html>