Improved false quote detection
This commit is contained in:
@@ -282,7 +282,7 @@ const word CRC_WT_SELECTACTION = 0xF7C0;
|
||||
const word CRC_MI_FORWARDMESSAGE = 0x644C;
|
||||
const word CRC_MI_MOVEMESSAGE = 0xAB24;
|
||||
const word CRC_MI_COPYMESSAGE = 0x6811;
|
||||
const word CRC_MI_TOGGLESENT = 0;
|
||||
const word CRC_MI_TOGGLESENT = 0x31f9;
|
||||
const word CRC_MI_QUITCMF = 0xE1B8;
|
||||
const word CRC_ST_ARE = 0x78C8;
|
||||
const word CRC_ST_IS = 0x27AC;
|
||||
|
@@ -2702,6 +2702,12 @@ void MsgLineReIndex(GMsg* msg, int viewhidden, int viewkludge, int viewquote) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if (line->type & GLINE_TXTH)
|
||||
{
|
||||
*qbuf0 = NUL;
|
||||
qmatches = 0;
|
||||
continue;
|
||||
}
|
||||
else if(line->type & GLINE_QUOT) {
|
||||
if(not viewquote) {
|
||||
GetQuotestr(line->txt.c_str(), qbuf, &qlen);
|
||||
|
@@ -393,7 +393,7 @@ int GetAkaNo(const ftn_addr& __aka);
|
||||
int GetQuotestr(const char* ptr, char* qbuf, uint* qlen);
|
||||
int cmp_quotes(char* q1, char* q2);
|
||||
int is_quote(const char* ptr);
|
||||
bool is_quote2(const Line* line, const char* ptr);
|
||||
bool is_quote2(Line* line, const char* ptr);
|
||||
int IsQuoteChar(const char* s);
|
||||
void maketitle();
|
||||
int maketitle_and_status(char *);
|
||||
|
@@ -373,7 +373,7 @@ int is_quote(const char* ptr) {
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
bool is_quote2(const Line* line, const char* ptr)
|
||||
bool is_quote2(Line* line, const char* ptr)
|
||||
{
|
||||
if (!CFG->quoteusenewai) return true;
|
||||
|
||||
@@ -410,6 +410,7 @@ bool is_quote2(const Line* line, const char* ptr)
|
||||
return true;
|
||||
|
||||
// take a look at previous lines
|
||||
Line *paragraph = NULL;
|
||||
for (Line *ln = line->prev; ln; ln = ln->prev)
|
||||
{
|
||||
// previous line is quoted?
|
||||
@@ -419,7 +420,14 @@ bool is_quote2(const Line* line, const char* ptr)
|
||||
if ((ln->txt.length() == 0) ||
|
||||
(ln->txt[0] == LF) ||
|
||||
(ln->txt[0] == CR))
|
||||
return true;
|
||||
{
|
||||
if (paragraph) return true;
|
||||
else
|
||||
{
|
||||
paragraph = ln;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
// or kludge?
|
||||
if (ln->txt[0] == CTRL_A)
|
||||
return true;
|
||||
@@ -439,6 +447,8 @@ bool is_quote2(const Line* line, const char* ptr)
|
||||
return true;
|
||||
}
|
||||
|
||||
// hide false paragraph
|
||||
if (paragraph) paragraph->type |= GLINE_TXTH;
|
||||
return false; // don't quote current line
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user