| 2234 | } |
| 2235 | |
| 2236 | void JavascriptProcessor::SnippetDocument::checkIfScriptActive() |
| 2237 | { |
| 2238 | isActive = true; |
| 2239 | auto text = getSnippetAsFunction(); |
| 2240 | |
| 2241 | if (!text.containsNonWhitespaceChars()) isActive = false; |
| 2242 | |
| 2243 | String trimmedText = text.removeCharacters(" \t\n\r"); |
| 2244 | |
| 2245 | String trimmedEmptyText = emptyText.removeCharacters(" \t\n\r"); |
| 2246 | |
| 2247 | if (trimmedEmptyText == trimmedText) isActive = false; |
| 2248 | } |
| 2249 | |
| 2250 | String JavascriptProcessor::SnippetDocument::getSnippetAsFunction() const |
| 2251 | { |
no test coverage detected