Skip to content

Commit

Permalink
fix: override coloring during dot export
Browse files Browse the repository at this point in the history
  • Loading branch information
igordejanovic committed Oct 2, 2024
1 parent d1b2f70 commit cde24f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Always regenerate `_actions.rs` in `OUT_DIR` folder. See [13]. Thanks
safinaskar@GitHub for reporting.
- Override coloring during dot export.

[12]: https://github.com/igordejanovic/rustemo/pull/12
[13]: https://github.com/igordejanovic/rustemo/issues/13
Expand Down
4 changes: 4 additions & 0 deletions rustemo-compiler/src/table/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1193,6 +1193,8 @@ impl<'g, 's> LRTable<'g, 's> {
.replace('?', r"\?")
};

colored::control::set_override(false);

let conflicts = self.get_conflicts();
let is_conflict_state =
|state: &LRState| conflicts.iter().any(|s| s.state == state);
Expand Down Expand Up @@ -1286,6 +1288,8 @@ impl<'g, 's> LRTable<'g, 's> {
}
}
}
colored::control::unset_override();

dot += "\n}\n";
dot
}
Expand Down

0 comments on commit cde24f0

Please sign in to comment.