Commit Graph

399 Commits

Author SHA1 Message Date
Daniel James
159ae73072 Make unicode globs invalid.
[SVN r86707]
2013-11-14 19:24:34 +00:00
Daniel James
5c41e67a6d Handle non-globs containing escaped characters.
[SVN r86706]
2013-11-14 19:24:01 +00:00
Daniel James
bd5338ee9e Validate globs.
[SVN r86705]
2013-11-14 19:23:26 +00:00
Daniel James
0998743a60 Error for invalid paths containing escaped slashes.
Note that the test cases are really awkward so this is unlikely to
actually happen normally, but implementation is much easier if it
doesn't have to worry about these cases.

[SVN r86704]
2013-11-14 19:22:48 +00:00
Daniel James
ad43e1eda1 Glob dependency tracking.
[SVN r86703]
2013-11-14 19:22:09 +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
9dd649ed9f Add glob support.
This is based on Rene's implementation, but I used my own glob function,
and adjusted a few things since it's now always using ascii. It would be
nice to support unicode, but that would require at the very least a
normalization library, and perhaps more than that.

[SVN r86699]
2013-11-14 19:19:54 +00:00
Daniel James
83e2d34c5a Use quickbook 1.7's attribute value for element ids.
Allows use of templates, and allows more characters, ids now end with
whitespace - like ids in links.

[SVN r86691]
2013-11-13 21:51:05 +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
c2a0bfcd6f Validate and process link values.
[SVN r86687]
2013-11-13 21:49:05 +00:00
Daniel James
daa229406a New parser for attribute value template calls. Refs #2035.
[SVN r86684]
2013-11-13 21:47:59 +00:00
Daniel James
0ec1072eb3 Only allow phrase templates in attribute values. Refs #2035.
[SVN r86683]
2013-11-13 21:47:28 +00:00
Daniel James
103cf67e08 Support source code tagging for sections.
[SVN r86667]
2013-11-12 20:35:14 +00:00
Daniel James
9b1ec8b2c9 Support source code tagging for paragraphs.
[SVN r86666]
2013-11-12 20:34:46 +00:00
Daniel James
4dcb1f3e21 Support source code tagging for lists.
[SVN r86665]
2013-11-12 20:34:23 +00:00
Daniel James
685a289f41 Remove spurious call to element_action.
[SVN r85808]
2013-09-20 20:06:32 +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
968d8f01a0 Fix bug where list tags were confused with markup lists.
[SVN r85341]
2013-08-13 22:22:28 +00:00
Daniel James
d4c1fbc9d4 More consistent markup for lists in templates in lists.
[SVN r85340]
2013-08-13 22:22:06 +00:00
Daniel James
25e37cd618 Generate simpara for ordered_list and itemized_list.
Also fixes block elements nested in lists.

[SVN r85326]
2013-08-12 21:35:29 +00:00
Daniel James
2de3a59944 Stop mismatched brackets causing an error with old quickbook.
Mismatched brackets are only an error for quickbook 1.6+.

[SVN r85289]
2013-08-10 19:19:02 +00:00
Daniel James
bd3be26138 Be a little smarter about skipping escaped templates.
Only possible since I made escaping punctuation templates illegal.

[SVN r85286]
2013-08-10 19:17:21 +00:00
Daniel James
80e2754a01 Make escaped punctuation templates illegal in 1.6.
There's a minor bug with escaped templates in 1.6 and I don't have time to
fix it, this will help limit its effect. As far as I'm aware no one uses
escaped templates with punctuation templates. Escaped templates are an
undocumented feature anyway.

[SVN r85285]
2013-08-10 19:16:46 +00:00
Daniel James
8dd38db6bd Add tests for escaped template calls.
[SVN r85284]
2013-08-10 19:16:01 +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
e75a070a0a Attempt at better list markup.
Doesn't work for: templates in lists or explicit list block elements
(because it detects when it's in a list based on the parser), but it is
usually at least as good as the older version.

This kind of thing would be much easier if I represented the lists in
data rather than translating them as they are parsed. Not sure if I'll
do that soon though.

[SVN r85247]
2013-08-08 21:22:52 +00:00
Daniel James
c76625f66e Fix skipping template body containing an escaped template call.
[SVN r85216]
2013-08-05 22:16:01 +00:00
Daniel James
8dfd18abd4 Expand all phrase templates inline, even if they contain blocks.
Hopefully more intuitive than turning what looks like a phrase into
a block.

[SVN r85130]
2013-07-23 08:23:29 +00:00
Daniel James
0394e8ff48 Disallow paragraph/list markup in phrase templates.
Can still use block tags.

[SVN r85128]
2013-07-23 08:22:49 +00:00
Daniel James
57e59f148a Allow block markup in phrase templates.
[SVN r85127]
2013-07-23 08:22:26 +00:00
Daniel James
2b5f23951e Allow block markup inside nested blocks (e.g. tables)
Since this is often indented, does not treat indented blocks as code
blocks. This is inconsistent for lists, so maybe indented blocks in
lists should always be code, or never be code. Or maybe it should be a
bit smarter about nested indented blocks.

[SVN r85126]
2013-07-23 08:21:56 +00:00
Daniel James
786a8b7625 Copy old template tests to new version.
[SVN r85125]
2013-07-23 08:21:32 +00:00
Daniel James
705605b381 Error if phrase element body doesn't parse.
[SVN r85117]
2013-07-22 19:34:32 +00:00
Daniel James
7dcc517949 Error if element used in incorrect context.
Should be less suprising than just not processing them. Needs more tests.

[SVN r85116]
2013-07-22 19:34:03 +00:00
Daniel James
8e0047f0fb Don't break out of a list after a block tag.
[SVN r84936]
2013-07-01 19:35:37 +00:00
Daniel James
90ff4dd172 Remove 1.7 test, which won't be relevant.
It's about to break because of a 1.6 change, but that doesn't matter because
it's an obsolete test. I've already removed it from my 1.7 development.

[SVN r84935]
2013-07-01 19:35:12 +00:00
Daniel James
0c69657973 Make nested paragraphs/code blocks in lists an error in 1.6.
They're now a 1.7 feature. Will revert to 1.5 behaviour before 1.6 final.

[SVN r84932]
2013-07-01 19:34:07 +00:00
Daniel James
7753fe7da3 Fix typo.
[SVN r84606]
2013-06-01 22:30:43 +00:00
Daniel James
919e42eafb Better project names.
[SVN r84564]
2013-05-30 21:47:02 +00:00
Daniel James
e4ea915cef Fill in more missing quickbook test copyright info.
[SVN r84376]
2013-05-19 18:07:51 +00:00
Daniel James
238f0e4779 Use .quickbook extension for all test files.
[SVN r84252]
2013-05-12 14:34:27 +00:00
Daniel James
11fb4ba99c Add copyright comments to python tests.
Keep inspect happy.

[SVN r84251]
2013-05-12 14:33:46 +00:00
Daniel James
73d4d08aab Add trailing newlines.
[SVN r84250]
2013-05-12 14:33:31 +00:00
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