Example #1
0
            private bool bBreak(string pres, Context c)
            {
                if (Text[P] == '\r')
                {
                    StringValue.Append(@"\r");
                    P++;
                    if (!EndOfString() && Text[P] == '\n')
                    {
                        StringValue.Append(@"\n");
                        P++;
                    }
                }
                else
                if (Text[P] == '\n')
                {
                    StringValue.Append(@"\n");
                    P++;
                }
                else
                {
                    return(false);
                }
                if (EndOfString() || c == Context.NoBreak)
                {
                    return(true);
                }

                // fold the string with escaping line break
                StringValue.AppendLine(@"\");
                StringValue.Append(pres);

                // if the following line starts from space char, escape it.
                if (Text[P] == ' ')
                {
                    StringValue.Append(@"\");
                }
                return(true);
            }