Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lost text when mismatched quote #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Source/RtfDomParser/Parser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,13 @@ public RTFToken NextToken( )
//myReader.Read();

c = myReader.Read();

/*
// Unknown what this particular code is for. It appears that if a block starts with a quote
// then we read until and end quote is found and add that as a text block. However, if no
// end quote is found and we hit and open or close token, then any text is thrown away.
// What is this code for?

if (c == '\"')
{
// 以双引号开头,读取连续的字符
Expand All @@ -676,6 +683,7 @@ public RTFToken NextToken( )
token.Key = str.ToString();
return token;
}
*/

while( c == '\r'
|| c == '\n'
Expand Down