I think that the dependencies should just be files that were loaded, so
I changed it to do that, but added an extra (hidden for now) option to
list all paths that were checked, staring with a `+` for files that are
present, and `-` for files that are absent.
Also fixed a bug with the path resolver.
[SVN r77973]
- Include relevant locations on path where file wasn't found.
- Improve `include_search` while I'm at it.
- Normalize paths for non-existent files.
- Tests, not integrated with Boost.Build yet. Needs to check that
python is available then run the script with the location of the
quickbook executable.
[SVN r77598]
Again, less gratuitous changes from older versions (although it's still
different). Also more consistent with generated markup from indented code
blocks.
[SVN r75732]
The macro syntax has been tightened up in 1.6, so that fewer characters
are available for macro identifiers. But macros can still be defined
using the older quickbook versions When such macros are defined, prevent
them from expanding in a quickbook 1.6 document.
[SVN r75630]
`value` doesn't track what a string is encoded as, and sometimes it's
plain text not boostbook. It would be nice to track the encoding and
automatically do the right thing, but I'm not sure if it's worth the
effort just now.
[SVN r75619]
Because code blocks are added in sections, a nested section could be
unindented too far. Code is unindented in the main quickbook actions, so
there's actually no need to do it when extracting code snippets.
But this lead to left over whitespace that would have been stripped. So
change the `start_snippet` and `end_snippet` grammars to swallow up the
line they're on.
I also added a newline before the end of the snippet, this cleaned up
the occasional syntax error.
But due to these changes there is more leading and trailing whitespace
in the generated code blocks, so I just changed the code block grammar
to strip them out. This means there are no newlines at the beginning or
end of code blocks, but that should be fine.
[SVN r75613]
- Fixes extension check.
- Looks for images relative to quickbook file instead of the current
working directory, so that it will work when run from another
directory.
- Allow user to specify the image location.
- Use `bbk_value` for synthesized attributes rather than `qbk_value`.
It's the right thing to do, but doesn't make any practical difference.
Still not happy with image path handling. I feel that they should be
relative to the quickbook file and be rewritten - in a similar manner to
`xinclude`.
[SVN r75612]
In quickbook 1.6, nested documents default to C++, regardless of the
parent's source mode so that they are interpreted as if they are
standalone documents.
[SVN r75528]
In the old parser, the `eol` never matched anything because the `space`
would gobble up any newlines, so I'm pretty sure the intent was to use
`blank` to remove any leading spaces. So do that in 1.6.
[SVN r75521]
Quite a big change. I moved the list logic into the grammar so that it's
easier to tell how to parse different blocks. Also reworked some of the
block vs. phrase stuff - it's a lot cleaner now which helped implement
this. It generates terrible markup at the moment, but at least the
parser is in place.
[SVN r75446]
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]