[go: up one dir, main page]

Change delimiter used to scope IDs from colon to hyphen

When Assembler rewrites IDs, it uses a triple colon as a delimiter between the ID qualifier and the ID it is rewriting. There are numerous problems with using a colon:

  • It's not a valid character in an XML ID (though it is valid in HTML)
  • It's a reserved as the namespace delimiter for IDs in CSS and JavaScript
  • It's a reserved character in AsciiDoc for making macros
  • It's a reserved character in Windows filenames

For these reasons, I think we should move away form using ::: as a delimiter. Instead, we should use triple hyphen (---). The benefit is that it's a valid ID character in all contexts, it's not matched as a replacement in AsciiDoc (like --), and it's typical to see in filenames.

Furthermore, instead of replacing / in a docname with ::, it should be replaced with a single hyphen (-). We can address any ID conflicts that might arise because of that change (albeit rare) at a later time.