get { return _bol; }
}
- static GLib.Regex fix_indent_regex;
-
private string temp_filename;
private bool file_exists;
bool first = true;
// discard tabs at beginning of line
- if (fix_indent_regex == null)
- fix_indent_regex = new GLib.Regex ("^\t+");;
+ unowned Regex fix_indent_regex = /^\t+/;
foreach (unowned string line in text.split ("\n")) {
if (!first) {
* }}}
*/
public bool set_colors (string str) {
- Regex val_regex;
- try {
- val_regex = new Regex ("^\\s*[0-9]+(;[0-9]*)*\\s*$");
- } catch (RegexError e) {
- assert_not_reached ();
- }
+ unowned Regex val_regex = /^\\s*[0-9]+(;[0-9]*)*\\s*$/;
string error_color = null;
string warning_color = null;
public bool enable_warnings { get; set; default = true; }
- static GLib.Regex val_regex;
-
/**
* Set all colors by string
*
* }}}
*/
public bool set_colors (string str, Report.Colored colored_output = Report.Colored.AUTO) {
- try {
- if (val_regex == null)
- val_regex = new Regex ("^\\s*[0-9]+(;[0-9]*)*\\s*$");
- } catch (RegexError e) {
- assert_not_reached ();
- }
+ unowned Regex val_regex = /^\\s*[0-9]+(;[0-9]*)*\\s*$/;
string error_color = null;
string warning_color = null;