This is a bit incoherent at the moment. It needs to be rearranged so
that there's a tutorial that introduces the concepts in a more logical
order. But I want to press on with some of the other updates.
[SVN r85403]
From the change log:
- Improved markup for lists.
- Make escaping templates with a punctuation identifier illegal.
Escaping templates with an alphanumeric identifier is still fine.
- 1.7 changes:
- Make it an error to use an element in the wrong context.
- Error if the body of a phrase element doesn't parse.
- List markup in nested blocks.
- Allow block elements in phrase templates.
- Make it an error to put a paragraph break (i.e. a blank line)
in a phrase template.
- Internal changes:
- Clean up the id manager implementation.
[SVN r85369]
I noticed a bug for an edge case in the id generator. Wouldn't be too
hard to fix, but the implementation was too complicated with some really
pointless optimizations, so I rewrote it using a simpler brute force
method. Will be fine for now unless something has a lot of duplicate ids.
[SVN r85368]
Which sounds obvious when it's put like that. But I originally did this
in the parser because the parser was tracking lists anyway. But that
made a mess of handling `[ordered_list]` and `[itemized_list]`, I tried
fixing that but made a pig's ear of it.
The code for handling 'explicit lists' will still be a bit messy because
the generator is currently oblivious to what type of block element it's
generating markup for, and it needs to be aware for lists.
[SVN r85339]
The document id has never been generated from the filename. It comes
from the docinfo `id` attribute, or if that doesn't exist, it's
generated from the document title. Although, thanks to bugs, it's a bit
more complicated than that.
[SVN r85328]
There's a minor bug with escaped templates in 1.6 and I don't have time to
fix it, this will help limit its effect. As far as I'm aware no one uses
escaped templates with punctuation templates. Escaped templates are an
undocumented feature anyway.
[SVN r85285]
Doesn't work for: templates in lists or explicit list block elements
(because it detects when it's in a list based on the parser), but it is
usually at least as good as the older version.
This kind of thing would be much easier if I represented the lists in
data rather than translating them as they are parsed. Not sure if I'll
do that soon though.
[SVN r85247]
It's always okay to save `template_depth` and `min_section_level`
because they only change at template calls, and template calls are
always cleanly nested.
[SVN r85129]