Since values are now used in most places, a lot of the complexity became
unnecessary. Some of the string stuff in values.cpp is now redundant,
but I'll leave it alone for now.
[SVN r75358]
This change has two side effects: anchors are placed slightly better and
non-element/template square brackets are terminated by the end of a
paragraph.
[SVN r75357]
The difference between `hard_space` and `space` is that `hard_space`
won't have a zero-width match in certain places. But in the `-` part of
a classic spirit rule, zero-width matches don't count so there's
effectively no difference.
[SVN r75354]
- Detect encoded templates in `call_template` so they're handled if
anything calls it or `call_code_snippet` directly.
- Handle any paragraphs that comebefore a encoded block template.
- Escaped templates should always be inline, it isn't block content.
- Try to support escaped encoded templates. It's a bit of a weird case
so I wasn't sure what to do. Just wrote out the boostbook in a phrase
which seems the best option.
- Escapes now override the template type. This should happen as the user
explictly asks for an escaped template.
[SVN r75270]
Turn anchors into a special type of element that can either be a block
or a phrase, so that when immediately followed by block content, the
parser will do the right thing.
`xinclude` and conditional phrases might need similar treatment,
although they're trickier.
[SVN r75269]
It's only used there so it fits into main_grammar's local state. It
would probably be a good idea to move more parsing stuff out of actions.
Or maybe the document state should be moved out of actions.
[SVN r75268]
Plus a little bit of a cleanup. There's a little bit of duplication
caused by this, but I think the clarity is worth it. Really do need a
better way of handling actions.
[SVN r75265]
If a 1.5 template called a 1.4 template, its parent would be its
'dynamic' parent (the 1.5 template), whose parent would be its lexical
parent - breaking the dynamic lookup. I've changed it so that when
using a dynamic lookup, 1.5+ templates are skipped over. That means
they can use whatever variable names they wish without issues.
It does mean that if a 1.4- template was specifically written to use
dynamic lookup, then it wouldn't be callable from 1.5. So it might
be better if they didn't skip over 1.5+ templates.
Alternatively if might be better to always lexical scoping, even for
older versions, on the assumption that it was a bug.
[SVN r75263]
Needs to store the version in the file object, since it's only known
after the file is read in, had to make files non-const. Put some checks
in to make sure this isn't abused but pretty messy.
[SVN r75260]
This implements the markup `[role red Some red text]`. Although I'm not
sure I like it that much. It would be pretty easy to use a template for
the same effect.
This is just the quickbook part of supporting coloured text, to complete
the ticket there needs to be css support for html pages and xsl support
for pdfs.
[SVN r75255]
Symbol tables are really expensive to create, so share between all
instances of `cpp_highlight` and `python_highlight`. It would be better
to create all the grammars just once, but that's trickier as they're quite
stateful and they're not nearly as expensive as the symbol tables.
[SVN r75254]
Files are now permanently loaded. Quickbook substrings are stored as
references into the file. Now positions are stored as iterators into
the original file, the line and column is calculated when messages are
output.
This doesn't have much effect on efficiency but it simplifies a few
things.
[SVN r75253]
This encapsulates more in the id and section handling code. Fixes a few
edge cases and separates implementation of the new and old section
handling code. Always normalizes and truncates generated ids in quickbook
1.6.
[SVN r75251]
And shuffle things round a bit to avoid adding too many dependents to
id_generator. For 1.6 I want section_info to use id_generator to nest
ids properly when there are duplicate section ids.
[SVN r75246]
- More consistent names.
- Not using `.` in basename.
- Run the quickbook manual test last (as when there's an error, the more
specific tests are more informative).
- Combine some of the code tests.
[SVN r75235]