Branch: Tag:

2016-11-04

2016-11-04 23:28:49 by Martin Nilsson <nilsson@fastmail.com>

has_value() is cleaner than search()>-1

557:    while (text[-1] == '\n')    text = text[..<1];    -  if (search(text, "->") > -1 || -  (search(text, "{") > -1 && search(text, "}") > -1) || -  (search(text, "(") > -1 && search(text, "\"") > -1) || -  (search(text, ".") > -1 && search(text, "=") > -1)) +  if (has_value(text, "->") || +  (has_value(text, "{") && has_value(text, "}")) || +  (has_value(text, "(") && has_value(text, "\"")) || +  (has_value(text, ".") && has_value(text, "=")))    {    if (!code_highlighter) {    code_highlighter = Tools.Standalone.pike_to_html();