mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:37:35 +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
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