mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-08 02:26:10 +00:00
LibMarkdown: Handle CRLF line endings
Previously, MDDocument only split on Unix-style line endings. This adds a new function to StringView which handles LF, CR and CRLF.
This commit is contained in:
parent
035c4e15f4
commit
2eb5793d55
Notes:
sideshowbarker
2024-07-19 10:59:35 +09:00
Author: https://github.com/remyabel2 🔰
Commit: 2eb5793d55
4 changed files with 68 additions and 1 deletions
|
@ -49,7 +49,7 @@ static bool helper(Vector<StringView>::ConstIterator& lines, NonnullOwnPtrVector
|
|||
|
||||
bool MDDocument::parse(const StringView& str)
|
||||
{
|
||||
const Vector<StringView> lines_vec = str.split_view('\n', true);
|
||||
const Vector<StringView> lines_vec = str.lines();
|
||||
auto lines = lines_vec.begin();
|
||||
|
||||
while (true) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue