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]
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]
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]
- 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]
Use a phrase with an id inside the header.
Using an anchor before the heading was causing problems when the heading
wasn't inside a section.
We can't use an anchor inside the header when it links to itself, as it
messes up getting the title for the link. Using an empty phrase means
that it will just get the empty title for the phrase. Thanks to John
Maddock for the idea.
This does generate slightly odd markup. We could possibly use the old
style markup whenever section depth > 0, since we would know that we're
inside a section, but that seems like an unnecessary complication.
[SVN r74346]
- Replaces repeated underscores with single underscores
- Truncates if they're too long.
- If the result ends with if a number, adds an underscore to separate
that from the duplicate number.
Only doing this for the duplicate ids, so that the main generated id
doesn't change for existing documentation. Will do something similar for
all generated ids in quickbook 1.6.
[SVN r73974]
Use a phrase with an id inside the header.
Using an anchor before the heading was causing problems when the heading
wasn't inside a section.
We can't use an anchor inside the header when it links to itself, as it
messes up getting the title for the link. Using an empty phrase means
that it will just get the empty title for the phrase. Thanks to John
Maddock for the idea.
This does generate slightly odd markup. We could possibly use the old
style markup whenever section depth > 0, since we would know that we're
inside a section, but that seems like an unnecessary complication.
[SVN r72723]
Not great since it closes the comments around the escaped code. But to
nest it properly will require a bigger change. Would also be nice to
deal with escape in other contexts - such as strings.
[SVN r71098]
Imports were failing because doc info expected values. The process_state
stuff is too fragile, so instead just process the contents of a
conditional phrase and discard them afterwards. Still suppresses all
elements.
[SVN r71062]
Pretty clumsy, but it's a dodgy thing to do. Maybe the values could
include whether they're blocks or phrases and actions could react
accordingly.
[SVN r71060]
Pretty clumsy, but it's a dodgy thing for the user to do. Maybe the
values could include whether they're blocks or phrases and actions could
react accordingly.
[SVN r71056]
If an included file has a docinfo block, use that docinfo. I'm not
entirely sure if the nested file be treated as if it's completely
standalone - i.e. should macros and templates defined in the parent be
used?
Also, there's some odd behaviour in quickbook if the docinfo block in an
included file has a parse error. It just goes back to the start and
parses as a file without a docinfo block. I think it would be better if
this was a hard error, but what should happen in someone has defined a
template with the same name as a docinfo block? That's actually valid in
existing quickbook, so the dodgy docinfo block might just be a template
call.
[SVN r70963]
- Do the normalization ourselves, so we don't use a deprecated function.
Refs #2923
- Move more of the logic into `path_difference` and try to make it
easier to read, because I found it a bit difficult.
[SVN r70231]
This is more consistent than it is at the moment. For the __FILENAME__
macro, use the path relative to the original file or the location last
matched on the include path. This ensures that the macro is consistent
no matter which directory you call quickbook from.
Also enable `__FILENAME__` in debug mode - so I can test this.
[SVN r70230]
- Encode the full paths into `quickbook-testing.jam` so it can be used from
other locations.
- Turn off debug symbols on Visual C++, they cause the build system to do
something odd to the tests.
[SVN r69823]
I don't think paragraph markup would be very useful right now, because
it wouldn't be usable in a phrase context.
These can't be templates because templates are implicitly wrapped in
paragraphs.
[SVN r69438]
quickbook-fail-test couldn't distinguish between correctly handled
errors and bugs, so add quickbook-error-test which will only succeed for
quickbook errors.
[SVN r69180]
Prevents docbook from making up ever changing ids. It would be nice to
use the heading's anchor. But that causes docbook to complain that it
can't generate a title for the link.
[SVN r68595]
* Store the location along with the contents of the template body, so
the location should usually be correct now. Exceptions are code
snippets, because they get rewritten, and the extra newlines added to
block template.
* Store if a template is a block template at the time of creation. Using
spirit to decide, rather than handwritten C++.
* Fix callout list markup.
* Fix the `skip_initial_spaces` stuff in `block.hpp`. This never really
worked before. No longer have to skip spaces in `parse_template` in
`actions.cpp`.
[SVN r64830]
Generates the ids during template expansion instead of when parsing the
code snippet - so that different ids are used for different exapnsions.
Refs #4416
[SVN r63809]
Sometimes template_info contains values from a previous failed parse. I
think this makes the last change unnecessary, but I'm going to leave it
in as I feel like it improved the grammar.
[SVN r63609]
* Require an eol after comments, so that an eol with content after it is
interpreted as a paragraph.
* 'eol >> eol' => 'eol >> *blank_p >> eol_p' so that lines containing
only a comment aren't interpreted as paragraph breaks.
* +eol after 'inside paragraphs' so that all the whitespace following
a paragraph is swallowed up. If it wasn't then it'd create lots of
empty paragraphs when there's a lot of whitespace.
[SVN r62700]