Commit Graph

281 Commits

Author SHA1 Message Date
tastytea 1eb763fc37
Mention bullseye-packages in apt-repo. 2021-06-07 15:08:20 +02:00
tastytea 633274e3dd
Version bump 0.5.1. 2021-06-07 15:05:16 +02:00
tastytea 51f8422929
Make HTML entity map static.
continuous-integration/drone/push Build is passing Details
Drastically reduces allocations.
2021-06-07 01:20:29 +02:00
tastytea 8b5c0d289e
print_matches(): Don't check file name for each match.
We only process one file at a time.
2021-06-07 01:09:37 +02:00
tastytea 7b817c42d1
Remove pseudo-HTML bug from man page. 2021-06-07 01:06:51 +02:00
tastytea be4d8aecd0
Mixed up types. 2021-06-07 00:44:42 +02:00
tastytea 1c8279f96f
Add test that asks for more context than is available.
continuous-integration/drone/push Build is passing Details
2021-06-07 00:05:33 +02:00
tastytea f59c86e20d
Don't search for whitespace beyond the start/end of the text. 2021-06-06 23:48:06 +02:00
tastytea 0470acb00e
Make --raw work again.
continuous-integration/drone/push Build is passing Details
2021-06-06 22:37:09 +02:00
tastytea 1e29608c7e
Fix positioning of matches in search::search(). 2021-06-06 22:34:52 +02:00
tastytea 5e89a71e00
Update tests for search::headline() and search::page(). 2021-06-06 22:11:45 +02:00
tastytea 9708bb69c8
Don't attempt to access a pointer to nowhere. 2021-06-06 21:34:48 +02:00
tastytea b8431019b7
Don't inject page numbers and headline-markers into the text.
continuous-integration/drone/push Build is failing Details
The metadata is recorded in position → data pairs.

Closes: #13
2021-06-06 21:26:09 +02:00
tastytea ebb8b63830
Mention inserted page markers in man page.
continuous-integration/drone/push Build is passing Details
2021-06-06 16:14:50 +02:00
tastytea a49c500d0f
Fix <style> and <script> erasure.
I didn't take into account that <script […]/> is possible.
2021-06-06 16:06:14 +02:00
tastytea 262aab6671
Add debug log for replacements. 2021-06-06 15:52:09 +02:00
tastytea 9067b387ef
Fix pagebreak-iterators.
Oopsie! 😄
2021-06-06 15:50:13 +02:00
tastytea 99e1cd8e98
Re-enabled address sanitizer.
continuous-integration/drone/push Build is passing Details
Found out what was wrong: I fed boost::regex_search() the pointer to a substring
that was created in-place. match[2] was a pointer to a substring inside that.

The problem was, that match was declared outside of the if-block. So after the
if-block match[2] would point to a now freed memory address. It didn't have any
effects because I didn't use match afterwards.

I rewrote the whole thing with iterators. Slightly less readable, slightly
better performance (probably).
2021-06-05 17:45:07 +02:00
tastytea bdf9a86651
Fix pagebreak-regex and range in which pagebreaks are searched. 2021-06-05 17:18:35 +02:00
tastytea f1a0015f28
Disable address sanitizer.
It complains about boost/regex/v5/sub_match.hpp:57:30 and I can't figure out
what's wrong or how to ignore it.
2021-06-05 14:24:53 +02:00
tastytea fbf86f51d1
CMake: Add presets for GCC and clang.
# Previous commits:
#   d630fe9 Make text formatting more readable.
#   4026937 Don't return pointer to freed memory address.
#   cb2aee8 Add address sanitizer to debug flags.
#   4b09158 Add automatic package generation for Debian bullseye (11).

# Previous commits:
#   12e1c64 Make text formatting more readable.
#   4026937 Don't return pointer to freed memory address.
#   cb2aee8 Add address sanitizer to debug flags.
#   4b09158 Add automatic package generation for Debian bullseye (11).
2021-06-05 13:34:52 +02:00
tastytea 12e1c64fc0
Make text formatting more readable. 2021-06-05 13:34:48 +02:00
tastytea 4026937f08
Don't return pointer to freed memory address. 2021-06-04 23:14:36 +02:00
tastytea cb2aee847f
Add address sanitizer to debug flags. 2021-06-04 23:08:50 +02:00
tastytea 4b09158037
Add automatic package generation for Debian bullseye (11). 2021-06-04 15:18:32 +02:00
tastytea 226b66b77b
Update maximum supported CMake version.
continuous-integration/drone/push Build is passing Details
2021-06-04 14:39:53 +02:00
tastytea 92b8281242
Fix CI recipe.
continuous-integration/drone/push Build is passing Details
2021-06-03 16:18:01 +02:00
tastytea 2b51229518
Change ctest verbosity to default.
continuous-integration/drone/push Build is failing Details
2021-06-03 15:57:56 +02:00
tastytea bc34a3a515
Make ctest work from build directory. 2021-06-03 15:56:08 +02:00
tastytea 85a00bb23c
Add CMake presets. 2021-06-03 15:44:31 +02:00
tastytea d83f485fb4
Ignore CMake user presets.
<https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html>
2021-06-03 15:05:42 +02:00
tastytea 7252463fbb
Update rebuild-commands in translator guide.
continuous-integration/drone/push Build is passing Details
2021-06-02 16:00:33 +02:00
tastytea 7d8cf7de91
Cosmetic fixes. 2021-06-02 14:49:59 +02:00
tastytea 5af10f6767
Fix configuration file example.
continuous-integration/drone/push Build is passing Details
2021-06-02 11:21:27 +02:00
tastytea d1c74d244d
Update screenshot.
continuous-integration/drone/push Build is passing Details
2021-06-02 10:04:27 +02:00
tastytea 21cd476be0
Bump version of german translation.
continuous-integration/drone/push Build is passing Details
2021-06-02 09:12:43 +02:00
tastytea cfa850b020
Fix lowest tested nlohmann_json version. 2021-06-01 22:56:50 +02:00
tastytea de2001a442
Fix nlohmann_json error with old versions.
continuous-integration/drone/push Build is passing Details
Old versions of nlohmann_json do not have support for std::string_view,
std::filesystem::::path(?) and std::pair(?).
2021-06-01 22:35:52 +02:00
tastytea ba2161fa47
Fix explanation for --json in man page.
continuous-integration/drone/push Build is failing Details
2021-06-01 20:23:54 +02:00
tastytea 5d6fdc599f
Version bump 0.5.0.
continuous-integration/drone/push Build was killed Details
2021-06-01 20:18:41 +02:00
tastytea d56cf4de56
Update german translation. 2021-06-01 20:18:18 +02:00
tastytea 6a4511099f
Do not add empty matches to matches_all. 2021-06-01 20:15:05 +02:00
tastytea 21989aabfe
Fix JSON output.
Bug: #3
2021-06-01 20:14:36 +02:00
tastytea f1cb16f6d0
Add JSON output.
Closes: #3
2021-06-01 19:17:44 +02:00
tastytea 7b4b9edfe5
Rename file names in search::matches to make it more clear. 2021-06-01 19:15:00 +02:00
tastytea ffec9578e6
Add note for Debians weird package naming. 2021-06-01 18:51:49 +02:00
tastytea 3166c7a823
Update credits. 2021-06-01 18:49:34 +02:00
tastytea 88e4e78db8
Add nlohmann_json dependency. 2021-06-01 18:47:12 +02:00
tastytea b0b6c00a90
Log application exit.
continuous-integration/drone/push Build is passing Details
2021-06-01 18:22:15 +02:00
tastytea a7fae314b3
Log some progress info to log file.
continuous-integration/drone/push Build is passing Details
2021-06-01 17:17:00 +02:00