Commit Graph

404 Commits

Author SHA1 Message Date
Daniel James
13023a2ed3 Fix unindenting trailing spaces in code blocks.
[SVN r84187]
2013-05-07 23:25:47 +00:00
Daniel James
172ff0f4e3 Macros in docinfo blocks for 1.6. Refs #8543.
[SVN r84153]
2013-05-05 13:47:26 +00:00
Daniel James
7e76b65ed8 C++11 keywords. Refs #8541.
[SVN r84152]
2013-05-05 13:46:57 +00:00
Daniel James
852820778d Only recognise preprocessor statements at the start of the line. Refs #8511.
[SVN r84151]
2013-05-05 13:46:38 +00:00
Daniel James
0e4b7dad31 Clean up mixed tabs/spaces when unindenting.
If the whitespace to be removed when unindenting a block is not
consistent, then replace all the indentation in that block with spaces
(i.e. expand tabs). This fixes some odd results that could happen, e.g.

    ....Line 1
    --->Line 2

(dots = spaces, arrow = tab) would become:

    ...Line 1
    Line 2

Because the first character was removed from each line. This now works
okay.

But I don't expand tabs when the whitespace that isn't removed is
inconsistent, which can have odd results, for example:

    ..Line 1
    ..->Line 2
    ......Line 3

Will just remove the first two spaces, resulting in:

    Line 1
    --->Line 2
    ....Line 3

This should be rare, as tabs after spaces are a bit odd. But maybe I
should convert to spaces more often. Perhaps when indentation is
inconsistent, or perhaps whenever a mixture of tabs and spaces are used,
or even always just do it.

[SVN r84150]
2013-05-05 13:46:23 +00:00
Daniel James
e926e24bb7 Support the token pasting operator in C++ code blocks. Refs #8510.
[SVN r84063]
2013-04-28 11:16:11 +00:00
Daniel James
8fa09072c2 Remove whitespace only leading lines from indented blocks.
[SVN r83123]
2013-02-24 11:23:15 +00:00
Daniel James
4ff7f3a9fb Fix mapped position when breaking up indented code.
[SVN r83122]
2013-02-24 11:23:02 +00:00
Daniel James
75842c4f5d Clean up poorly overloaded 'add' method.
[SVN r83120]
2013-02-24 11:22:33 +00:00
Daniel James
f34940b3a7 Store indentation change in source map.
Used to infer it when required, which could go wrong.

[SVN r83118]
2013-02-24 11:22:03 +00:00
Daniel James
a586cd7822 Source map tests.
[SVN r83117]
2013-02-24 11:21:50 +00:00
Daniel James
b2a5262c81 Convert to use boost::string_ref
[SVN r83116]
2013-02-24 11:21:31 +00:00
Daniel James
80e65f66fe Quickbook: Deal with checked paths that aren't present. Refs #6691.
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]
2012-04-14 17:33:14 +00:00
Daniel James
818aeade78 Quickbook: Use container forwarding for gcc/darwin.
It's usually safe. Especially since we're controlling the build.

[SVN r77830]
2012-04-08 15:27:48 +00:00
Daniel James
23fbf1a714 Quickbook: Further dependencies development. Refs #6691
- 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]
2012-03-27 23:00:48 +00:00
Daniel James
0463a93263 Quickbook: Merge from trunk.
Includes blocks in lists fixes, and some documentation changes.


[SVN r77347]
2012-03-16 08:48:10 +00:00
Daniel James
a883a5b13c Quickbook: Initial implementation of templates in link values.
[SVN r76647]
2012-01-22 23:08:21 +00:00
Daniel James
0c0795fcff Quickbook: Escaped markup in docinfo blocks.
[SVN r76645]
2012-01-22 23:07:26 +00:00
Daniel James
69c735145f Quickbook: Merge to quickbook-dev
[SVN r76636]
2012-01-22 17:28:46 +00:00
Daniel James
672caeec17 Quickbook: Code block callouts.
[SVN r75897]
2011-12-11 11:16:01 +00:00
Daniel James
3ed6415296 Quickbook: Support single entity source mode marker.
[SVN r75895]
2011-12-11 11:14:17 +00:00
Daniel James
47eb39d0bc Quickbook: Use values for code blocks.
Also better error report for unclosed code block.

[SVN r75894]
2011-12-11 11:13:24 +00:00
Daniel James
13ce9e9fdb Quickbook: Use 1.7 for everything on dev branch.
Might promote them to 1.6 later.

[SVN r75892]
2011-12-11 11:11:50 +00:00
Daniel James
4c2ad1f909 Quickbook: Merge from trunk to quickbook-dev.
[SVN r75846]
2011-12-07 09:40:30 +00:00
Daniel James
b12549faa9 Quickbook: Spelling correction.
[SVN r75770]
2011-12-02 08:33:46 +00:00
Daniel James
2f1ab31350 Quickbook: More error checking for file handling.
[SVN r75769]
2011-12-02 08:28:57 +00:00
Daniel James
3d27c1c360 Quickbook: Fix xmlbase and xinclude path handling.
[SVN r75766]
2011-12-02 00:05:17 +00:00
Daniel James
7dad879e3d Quickbook: Fix paragraph separator at end of string.
[SVN r75759]
2011-11-30 21:22:41 +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
e94940c9ec Quickbook: Use version switch for image alt text change.
Was comparing the output of different versions of the quickbook executable and
the change seemed gratuitous.


[SVN r75731]
2011-11-29 22:41:10 +00:00
Daniel James
9d4fa2a2fa Quickbook: Fix command line error on windows.
I think it might be a bug that the test was incorrectly failing, but not a
serious one. I'll get back to it later.


[SVN r75730]
2011-11-29 22:15:39 +00:00
Daniel James
cc3ec7f700 Quickbook: Fix list processing bug.
[SVN r75700]
2011-11-28 00:13:10 +00:00
Daniel James
46cd4c2dba Quickbook: Fix error with empty macro defines.
[SVN r75699]
2011-11-27 22:45:55 +00:00
Daniel James
684e03c894 Quickbook: Remove files left over after merge.
[SVN r75697]
2011-11-27 21:41:42 +00:00
Daniel James
ef6628f851 Quickbook: Merge from quickbook-dev to trunk.
[SVN r75696]
2011-11-27 21:34:56 +00:00
Daniel James
73f76e778e Quickbook: Allow block elements in lists.
[SVN r75632]
2011-11-22 23:50:48 +00:00
Daniel James
e779bb6f08 Quickbook: Avoid expanding macros that are now invalid.
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]
2011-11-22 23:50:17 +00:00
Daniel James
44cdb88eec Quickbook: Deal with unbalanced code snippets.
[SVN r75627]
2011-11-22 23:49:26 +00:00
Daniel James
32721bd39e Quickbook: Deal with invalid command line macros.
[SVN r75624]
2011-11-22 23:48:25 +00:00
Daniel James
1165c7a147 Quickbook: Only use explicit alt text.
[SVN r75620]
2011-11-22 23:47:19 +00:00
Daniel James
a7de315f0c Quickbook: Better string names for value.
`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]
2011-11-22 23:47:02 +00:00
Daniel James
23e168a340 Quickbook: Use intrusive_ptr for files.
[SVN r75616]
2011-11-22 23:46:13 +00:00
Daniel James
650c3088c2 Quickbook: Track position in code blocks and snippets.
[SVN r75614]
2011-11-22 23:45:37 +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
43f9288487 Quickbook: Fix SVG handling.
- 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]
2011-11-22 23:44:57 +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
a041edab9c Quickbook: Fail gracefully if document info is missing.
I also tweaked `pre` and `post` a bit while I was at it.

[SVN r75538]
2011-11-17 21:07:01 +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