Docbook requires sections to have titles, but if they're empty it writes
out a '???' title, having not title seems cleaner. Can be fooled by
putting empty phrase markup in the title, so might need to be a little
smarter about that.
I'm considering adding a warning, perhaps an error in strict mode.
Actually a subtle change, as includes and anchors could previously
contain spaces. Possibly should still alow that, although I expect it's
never used.
[SVN r86688]
Fix bug where a code block at the start of a file was not recognised.
I was actually adding this test to check that the `source_mode_unset`
mechanism in `doc_info_grammar.cpp` was working, but it ended exposing
this bug.
[SVN r85590]
Again, less gratuitous changes from older versions (although it's still
different). Also more consistent with generated markup from indented code
blocks.
[SVN r75732]
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]
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]
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]
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]
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]
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]