Commit graph

12 commits

Author SHA1 Message Date
Andreas Kling 13d7c09125 Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Lenny Maiorani f99d1d3bd7 Vector: Implement find, find_if, find_first_matching in terms of AK::find*
Problem:
- The implementation of `find` is coupled to the implementation of `Vector`.
- `Vector::find` takes the predicate by value which might be expensive.

Solution:
- Decouple the implementation of `find` from `Vector` by using a
  generic `find` algorithm.
- Change the name of `find` with a predicate to `find_if` so that a
  binding reference can be used and the predicate can be forwarded to
  avoid copies.
- Change all the `find(pred)` call sites to use `find_if`.
2021-01-11 19:45:05 +01:00
asynts 938e5c7719 Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.Everything:

The modifications in this commit were automatically made using the
following command:

    find . -name '*.cpp' -exec sed -i -E 's/dbg\(\) << ("[^"{]*");/dbgln\(\1\);/' {} \;
2021-01-09 21:11:09 +01:00
Linus Groh b5b4c50913 LibMarkdown: Only consider "!" a special character when followed by "["
Fixes #4220.
2020-11-29 10:45:00 +01:00
AnotherTest 7640cb8ec4 LibMarkdown: Add a Text(String) constructor 2020-09-27 21:14:18 +02:00
Ben Wiederhake da966ac8d8 LibMarkdown: Make warning messages conditional
This is especially a problem during fuzzing.
2020-09-12 13:46:15 +02:00
FalseHonesty 20faa93cb0 LibMarkdown: Change internal MD API to return OwnPtrs
Previously, all Markdown blocks had a virtual parse method which has
been swapped out for a static parse method returning an OwnPtr of
that block's type.

The Text class also now has a static parse method that will return an
Optional<Text>.
2020-05-30 00:32:12 +02:00
Andreas Kling 4330046aff LibMarkdown: Turn absolute links into hyperlinks in terminal output :^)
I'm not completely sure how to handle this nicely for relative links
but it would be nice to do that too.
2020-05-09 16:23:41 +02:00
Linus Groh 0a1ecbec48 LibMarkdown: Escape HTML entities in text 2020-05-05 16:18:11 +02:00
Sergey Bugaev f1a8fb1e88 LibMarkdown: Add support for images :^) 2020-04-30 11:30:27 +02:00
Sergey Bugaev b8aab5fdc3 LibMarkdown: Handle broken link markup better
Let's output *something* instead of crashing on a failed assertion.
2020-04-30 11:30:27 +02:00
Andreas Kling ea204ef05b LibMarkdown: Drop MD prefixes and move into "Markdown" namespace :^) 2020-04-28 21:04:25 +02:00
Renamed from Libraries/LibMarkdown/MDText.cpp (Browse further)