Commit graph

128 commits

Author SHA1 Message Date
Wilhelm Schuermann
2e3b8c8c2a Plumbing: Move basic format() calls to templates
- format() is already using variadic templates, make use of a plain one
  to remove more code bloat.
2015-06-09 11:13:44 +02:00
Wilhelm Schuermann
e95167a984 Plumbing: Use variadic templates for format()
- Use variadic templates, with a slight twist for properly supporting
  Taskwarrior's l10n strings.
- Adjust code that relied on implicit type conversion which led to
  problems with template instantiation.
- Move some functionality out of format() in order to keep it generic.
2015-06-07 20:54:02 +02:00
Wilhelm Schuermann
ae692e07a6 Verbosity: Fix "project" info not showing
- Make "project" verbosity imply "footnote", since verbose project
  info is shown using footnotes.  Fixes failing test in verbose.t.
- Convert "verbosity" variable to std::set for increased readability.
2015-06-07 15:01:26 +02:00
Paul Beckingham
5d60f426a8 Obfuscation: rc.obfuscate=1 hides private details 2015-04-26 10:31:32 -04:00
Paul Beckingham
39fb45447b Lexer: Migrated ispunct to Lexer::isPunctuation 2015-04-16 23:52:43 -04:00
Paul Beckingham
3cbb2bb20f Lexer: Migrated isdigit to Lexer::isDigit 2015-04-16 23:33:25 -04:00
Wilhelm Schuermann
7a64c19641 Resolve most compiler warnings 2015-03-29 22:05:38 +02:00
Paul Beckingham
26aff348d2 Lexer
- Replaced old digitsOnly() function with Lexer::isAllDigits.
2015-02-22 20:23:00 -05:00
Paul Beckingham
9f82926c65 Text
- Removed obsolete noSpaces() function.
2015-02-22 18:27:19 -05:00
Paul Beckingham
745aad0d27 Lexer
- Renamed Lexer2 to Lexer, it looks good enough to assume control.
2015-02-22 18:23:03 -05:00
Paul Beckingham
6683cc7e83 Converted to Lexer2. 2015-02-19 21:31:47 -08:00
Paul Beckingham
520067f522 Cleanup
- Eliminated text.cpp upperCase(), as it was not UTF8-safe, and is no longer
  used.
2015-02-17 10:44:31 -05:00
Paul Beckingham
ec919a8677 TW-1534
- TW-1534 Urgency coefficient for user project disables 'info' output(thanks to
          Martin).
- Reimplemented 'information' command urgency details as a ViewText.
- Fixed math bug in rightJustify.
2015-02-14 12:50:10 -05:00
Paul Beckingham
b7ad091d00 Updated copyright to 2015 2015-01-01 00:00:41 -05:00
Paul Beckingham
d8691bc993 Text
- More polymorphic formatting.
2014-12-28 13:05:32 -05:00
Paul Beckingham
d9d5d004e6 Code Cleanup
- Removed unused text.cpp cutOff function.
2014-09-07 16:39:05 -04:00
Paul Beckingham
fdb4c1f1bc Code Cleanup
- Removed unused text.cpp visible function.
2014-09-07 16:35:51 -04:00
Paul Beckingham
6303f1c436 Code Cleanup
- Removed unused text.cpp guess function.
2014-09-07 16:30:27 -04:00
Paul Beckingham
f17c59b1f6 Code Cleanup
- Removed unused text.cpp split_minimal function.
2014-09-07 16:27:46 -04:00
Paul Beckingham
8a904fc287 Code Cleanup
- Removed unused text.cpp noVerticalSpace function.
2014-09-07 16:21:32 -04:00
Paul Beckingham
3f07173a03 Code Cleanup
- Removed unused text.cpp isWordEnd function.
2014-09-07 16:15:32 -04:00
Paul Beckingham
7890cf0ab7 Code Cleanup
- Removed unused text.cpp isWordStart function.
2014-09-07 16:12:06 -04:00
Paul Beckingham
c1806303a1 Code Cleanup
- Removed unused text.cpp isTokenEnd function.
2014-09-07 16:06:42 -04:00
Paul Beckingham
ad4d063252 Text Formatting
- Added another formatter.  Time for variadics?
2014-08-31 10:19:48 -04:00
Paul Beckingham
9537a91e89 Text
- Added another format overload. Time for variadics?
2014-06-07 09:52:01 -04:00
Paul Beckingham
f8bb948b90 Text
- Added formatter for <int, int, std::string>.  There cannot be many
  combinations remaining.
2014-05-25 13:18:30 -04:00
Paul Beckingham
74cfc972fc Code Cleanup
- Converted use of isspace (which doesn't know Unicode) to Lexer::is_ws.
2014-04-24 17:06:05 -04:00
Paul Beckingham
0dc73d759b DOM
- Migrated DOM off A3, onto A3t.  First live use of new parser.
2014-04-24 11:48:43 -04:00
Paul Beckingham
d99f40eaad Code Cleanup
- Removed obsolete text.cpp splitq funciton, which is superceded by
  Lexer::split.
2014-04-24 09:35:02 -04:00
Paul Beckingham
386bcea60e Text
- Removed splitq function and tests, migrated code over to the new
  Lexer::split.
2014-04-23 23:20:56 -04:00
Paul Beckingham
d099a4edfd Text Handling
- Migrated the splitq implementation over to the Lexer. Now it handles all
  Unicode spaces.  Jsut need to obsolete the old version.
2014-04-23 17:34:07 -04:00
Paul Beckingham
523dce8f32 Code Cleanup
- Standardized headers.
2014-02-01 14:33:37 -05:00
Paul Beckingham
98f740e9d1 Merge branch '2.3.0' into 2.4.0
Conflicts:
	AUTHORS
	CMakeLists.txt
	NEWS
	src/A3.cpp
	src/CMakeLists.txt
	src/Config.cpp
	src/Duration.cpp
	src/Duration.h
	src/Nibbler.cpp
	src/Nibbler.h
	src/RX.cpp
	src/RX.h
	src/columns/ColDate.cpp
	src/columns/ColScheduled.cpp
	src/commands/Command.cpp
	src/legacy.cpp
	src/utf8.cpp
	src/utf8.h
	test/CMakeLists.txt
	test/bug.mergedeps.t.postponed
	test/duration.t.cpp
	test/merge.duplicates.t
	test/merge.simple_duplication.t
	test/merge.t
	test/nibbler.t.cpp
	test/roundtrip.t
	test/rx.t.cpp
	test/utf8.t.cpp
2014-01-07 19:10:03 -05:00
Paul Beckingham
8ed92ca498 Copyright
- Bumped copyright to 2014, ready for release.
2014-01-01 13:32:22 -05:00
Paul Beckingham
7e5b43bb9d Function: visible
- Added helper function to render control characters visible.  This may be
  replaced by JSON::encode.
2013-08-30 10:51:43 -07:00
Paul Beckingham
d03c4cda8a Build Error
- Many files were missing an explicit cmake.h include.  Some were not including
  it at all.  Now it's used almost everywhere.

(cherry picked from commit 82ae86979c497e6d1d0c6b2b5a55aa379ec82c98)
2013-06-02 13:57:36 -04:00
Paul Beckingham
773b55d374 Code Cleanup
- Removed L10N define.  It served its purpose.
2013-04-07 23:50:51 -04:00
Paul Beckingham
d14a9cacec Text Formatting
- Added a format overload for three integers.
2013-04-01 15:50:16 -04:00
Paul Beckingham
1dccd29643 Copyright 2013
- Updated copyright notices.
2013-03-04 17:47:12 -05:00
Paul Beckingham
6aa0277749 Bug #1189
- Fixed bug #1189, which caused wide Asian UTF8 characters to be measured as
  narrow characters (thanks to Roy Zuo).
2013-03-02 18:22:21 -05:00
Paul Beckingham
b6c28ecb7a Bug #1136
- Fixed bug #1136, which incorrectly line-wrapped tasks with annotations
  (thanks to Steve Rader).
2013-02-10 16:08:45 -05:00
Paul Beckingham
e6804a1679 UTF8 Line Extraction
- Minor efficiency modification, made while fixing a bug.
2013-02-10 08:46:19 -05:00
Johannes Schlatow
55813b6a09 Bug
- Colons are evil, fixed ZSH completion commands.
2013-01-15 01:05:28 +01:00
Scott Kostyshak
4ca5c85054 Bug
- Fix a bug where 'print.empty.columns=no' resulted in never printing the
  project column because ColProject::measure did not take into account
  the length of the last word of the project name.
- Unit tests.
2013-01-03 23:43:16 -05:00
Paul Beckingham
d9e24098b5 C -> C++
- Integrated wcwidth6.c more into text.cpp.
- Moved wcwidth6.c to wcwidth6.cpp, to cure some strange build issue.
2012-10-29 16:09:32 -04:00
Scott Kostyshak
4baaf52610 Bug
- Hyphenation is not needed when words are split with commas.
- Unit test added.
2012-10-20 14:34:12 -04:00
Louis-Claude Canon
0ac6578899 Enhancement
- When formating real numbers that are between 0 and 1, the width controls the
  number of characters that are shown (with width "4", "0.01234" is shown as
  "0.01").
2012-07-27 08:19:21 -04:00
Paul Beckingham
43c2b402cd Bug #967
- Fixed bug #967, which did not properly determine character widths for UTF8
  characters (thanks to Victor Roetman, Jörg Plate, Markus Kuhn).
2012-07-15 00:14:04 -04:00
Paul Beckingham
f23d8921e4 Enhancement
- Modified the closeEnough function to accept a minimum match length.
  Useful, but initially not used.
2012-06-02 10:05:32 -04:00
Paul Beckingham
86e74c1020 Code Cleanup
- Removed unused function and corresponding unit tests.  YAGNI.
2012-03-11 15:33:45 -04:00