void HTidyInterface::SetTidyConfig( TidyDoc tdoc ) { CString strTidy; if (SYN_HTML == m_onlyHtmlXml) { strTidy = g_GlobalTidy.m_TidyHtml; } else { strTidy = g_GlobalTidy.m_TidyXml; } int lenTidy = strTidy.GetLength(); if (lenTidy <= 0 || strTidy[0] != '-') { return; } int nOption = -1; for (int i = 0; i < lenTidy; ++i) { if (strTidy[i] == '-') { if (-1 != nOption) { SetTidyControl(tdoc, strTidy, nOption, i - nOption); } nOption = i; } } SetTidyControl(tdoc, strTidy, nOption, lenTidy - nOption); }
void CSetPageBase::SetTidyConfig(LPCTSTR lpszTidy) { int lenTidy = _tcsclen(lpszTidy); if (lenTidy <= 0 || lpszTidy[0] != '-') { return; } int nOption = -1; for (int i = 0; i < lenTidy; ++i) { if (lpszTidy[i] == '-') { if (-1 != nOption) { SetTidyControl(lpszTidy, nOption, i - nOption); } nOption = i; } } SetTidyControl(lpszTidy, nOption, lenTidy - nOption); }