Commit Graph

42 Commits

Author SHA1 Message Date
Daniel James
f4c1abc064 Rename gold.html files so inspect doesn't check them for link errors 2018-01-10 13:58:12 +00:00
Daniel James
4682c297c7 Test onehtml generation 2017-12-31 14:21:13 +00:00
Daniel James
18b37e4045 Don't write out empty section titles
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.
2017-05-22 01:10:54 +01:00
Daniel James
5c41e67a6d Handle non-globs containing escaped characters.
[SVN r86706]
2013-11-14 19:24:01 +00:00
Daniel James
351ab07fb8 Fix the platform independent paths for globs.
[SVN r86702]
2013-11-14 19:21:37 +00:00
Daniel James
b593058fa6 Only run glob in existing directories.
Maybe it should be an error if there are no matches.

[SVN r86701]
2013-11-14 19:21:04 +00:00
Daniel James
0587081610 Only match files when the whole glob matches.
[SVN r86700]
2013-11-14 19:20:38 +00:00
Daniel James
556f06db5f Allow template calls in anchors, roles and includes.
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]
2013-11-13 21:49:49 +00:00
Daniel James
3f0ad9cd77 Respect indentation at the start of a file.
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]
2013-09-07 07:24:47 +00:00
Daniel James
23bebbecca Improve the handling of file ids.
Instead of messing around with the section's id, leave it alone and
check for a file id whenever looking up the current id.

[SVN r85267]
2013-08-10 09:06:59 +00:00
Daniel James
919e42eafb Better project names.
[SVN r84564]
2013-05-30 21:47:02 +00:00
Daniel James
238f0e4779 Use .quickbook extension for all test files.
[SVN r84252]
2013-05-12 14:34:27 +00:00
Daniel James
c0ed3d8064 Quickbook: In 1.6 don't put 'inline' code blocks in paragraphs.
Might rename them 'explicit' code blocks.

[SVN r75840]
2011-12-07 09:19:07 +00:00
Daniel James
0f051efd8c Quickbook: Allow a single newline at the end of an explicit code block.
Again, less gratuitous changes from older versions (although it's still
different). Also more consistent with generated markup from indented code
blocks.


[SVN r75732]
2011-11-29 22:57:23 +00:00
Daniel James
a26a70fc7b Quickbook: Don't unindent code blocks in code snippets.
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]
2011-11-22 23:45:16 +00:00
Daniel James
48d023522b Quickbook: Some id_manager clean up.
Tweak the id handling for using 1.5- compatibility mode inside 1.6
documents (you can't see this in the tests).

[SVN r75610]
2011-11-22 23:44:16 +00:00
Daniel James
caf01e40e7 Quickbook: Prevent 'endsect' from ending an include id.
[SVN r75539]
2011-11-17 21:07:16 +00:00
Daniel James
317704c7b7 Quickbook: Fix issue with unbalanced sections.
[SVN r75537]
2011-11-17 21:06:44 +00:00
Daniel James
ad0d5cd69b Quickbook: Another id_manager rewrite.
Now separates file and section tracking, since sections aren't
necessarily cleanly nested in files, and files have some local state.

[SVN r75534]
2011-11-17 21:05:53 +00:00
Daniel James
d125ab418c Quickbook: Trim trailing space from document title.
[SVN r75529]
2011-11-17 21:04:27 +00:00
Daniel James
476e11c3ab Quickbook: Make source mode a document attribute and fix implementation.
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]
2011-11-17 21:04:02 +00:00
Daniel James
34c053f833 Quickbook: Parse version as for any other docinfo attribute.
[SVN r75441]
2011-11-10 18:15:30 +00:00
Daniel James
0e7874bfb6 Quickbook: Fix some tests.
I use compatibility mode to decide whether to link headers to
themselves. I'm not sure about that.

[SVN r75437]
2011-11-10 18:14:08 +00:00
Daniel James
cdcd5349f6 Quickbook: Better parser for hr.
The old version had issues with multi-line comments.

[SVN r75350]
2011-11-06 22:19:25 +00:00
Daniel James
1058b13396 Quickbook: Compatibility mode to make upgrading easier.
[SVN r75347]
2011-11-06 22:18:32 +00:00
Daniel James
3ae7265139 Quickbook: New version of id_manager. Fixes #1221.
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]
2011-11-02 07:49:22 +00:00
Daniel James
3ab3116ee4 Quickbook: Reset section info for nested documents.
So when including a document inside a section, the section's id is not
used. Also cleans up the messy handling of section.min_leveln.

[SVN r75245]
2011-11-02 07:43:03 +00:00
Daniel James
39e3a6e670 Quickbook: Fix including from inside a section.
It's a bit of a crazy edge case which creates invalid docbook in 1.6.

[SVN r75236]
2011-11-01 19:21:36 +00:00
Daniel James
291df92b92 Quickbook: Trim trailing whitespace in code blocks.
[SVN r75224]
2011-11-01 19:00:21 +00:00
Daniel James
3c39fbca2e Quickbook: Clean up whitespace prior to programlisting.
[SVN r75223]
2011-11-01 19:00:02 +00:00
Daniel James
77694a9ce4 Quickbook: Close any open sections at end of document.
[SVN r75220]
2011-11-01 18:59:08 +00:00
Daniel James
4a6dd9e97a Quickbook: Port Rene's sort code inclusion to quickbook-dev.
[SVN r75175]
2011-10-30 09:29:56 +00:00
Daniel James
a2b3c3aa04 Quickbook: Merge from trunk to quickbook-dev.
[SVN r73365]
2011-07-25 21:41:36 +00:00
Daniel James
2f3d468aa6 Quickbook: Change the anchor markup for headers.
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]
2011-06-23 17:46:05 +00:00
Daniel James
bf1d753dba Merge tools directory from trunk.
[SVN r72698]
2011-06-20 19:19:56 +00:00
Daniel James
d4344ed435 Quickbook: Remove most of process suppression stuff.
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]
2011-04-06 23:59:24 +00:00
Daniel James
d90650a679 Quickbook: In 1.6, override document id with id from include element.
[SVN r71013]
2011-04-05 20:03:18 +00:00
Daniel James
85e8c03d70 Quickbook: Include code file in 1.6.
[SVN r70960]
2011-04-03 19:19:07 +00:00
Daniel James
9489385464 Quickbook: Import templates+macros from quickbook file in 1.6
[SVN r70959]
2011-04-03 19:18:38 +00:00
Daniel James
02406bf553 Quickbook: Scope templates in include in 1.6
[SVN r70958]
2011-04-03 19:18:12 +00:00
Daniel James
100766d570 Quickbook: New tests. Mostly state tracking.
[SVN r70868]
2011-04-02 17:43:52 +00:00
Daniel James
85cb554400 Quickbook: use relative paths in errors and __FILENAME__.
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]
2011-03-20 21:41:18 +00:00