mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-14 21:09:05 +08:00
fix: URL extraction - handle final single-quote smart - try to fix issue #5464
This commit is contained in:
parent
af1aee6d46
commit
2b11655ab8
12
src/Edit.c
12
src/Edit.c
@ -8300,13 +8300,21 @@ static void _UpdateIndicators(const int indicator, const int indicator2nd,
|
||||
break; // wrong match
|
||||
}
|
||||
|
||||
// URL-specific: if match ends with single-quote and is preceded by one, strip trailing quote
|
||||
DocPos mlen_adj = mlen;
|
||||
if ((indicator == INDIC_NP3_HYPERLINK) && (mlen_adj > 4)) {
|
||||
if ((SciCall_GetCharAt(end - 1) == '\'') && (start > 0) && (SciCall_GetCharAt(start - 1) == '\'')) {
|
||||
--mlen_adj;
|
||||
}
|
||||
}
|
||||
|
||||
_ClearIndicatorInRange(indicator, indicator2nd, start_m, end);
|
||||
|
||||
SciCall_SetIndicatorCurrent(indicator);
|
||||
SciCall_IndicatorFillRange(start, mlen);
|
||||
SciCall_IndicatorFillRange(start, mlen_adj);
|
||||
if (indicator2nd >= 0) {
|
||||
SciCall_SetIndicatorCurrent(indicator2nd);
|
||||
SciCall_IndicatorFillRange(start, mlen);
|
||||
SciCall_IndicatorFillRange(start, mlen_adj);
|
||||
}
|
||||
|
||||
// next occurrence
|
||||
|
||||
Loading…
Reference in New Issue
Block a user