| 306 | } |
| 307 | |
| 308 | wstring TeXParser::getCommand() { |
| 309 | int spos = ++_pos; |
| 310 | wchar_t ch = L'\0'; |
| 311 | |
| 312 | while (_pos < _len) { |
| 313 | ch = _parseString[_pos]; |
| 314 | if ((ch < 'a' || ch > 'z') && |
| 315 | (ch < 'A' || ch > 'Z') && |
| 316 | (_atIsLetter == 0 || ch != '@')) |
| 317 | break; |
| 318 | |
| 319 | _pos++; |
| 320 | } |
| 321 | |
| 322 | if (ch == L'\0') return L""; |
| 323 | |
| 324 | if (_pos == spos) _pos++; |
| 325 | |
| 326 | wstring com = _parseString.substr(spos, _pos - spos); |
| 327 | if (com == L"cr" && _pos < _len && _parseString[_pos] == ' ') _pos++; |
| 328 | |
| 329 | return com; |
| 330 | } |
| 331 | |
| 332 | void TeXParser::insert(int s, int e, const wstring& formula) { |
| 333 | _parseString.replace(s, e - s, formula); |
nothing calls this directly
no outgoing calls
no test coverage detected