mirror of https://github.com/YosysHQ/yosys.git
Merge pull request #3809 from YosysHQ/nak/show_escape
This commit is contained in:
commit
941fa70ce1
|
@ -201,6 +201,12 @@ struct ShowWorker
|
|||
if (id[0] == '\\')
|
||||
id = id.substr(1);
|
||||
|
||||
// TODO: optionally include autoname + print correspondence in case of ambiguity
|
||||
size_t max_label_len = abbreviateIds ? 256 : 16384;
|
||||
if (id.size() > max_label_len) {
|
||||
id = id.substr(0,max_label_len-3) + "...";
|
||||
}
|
||||
|
||||
std::string str;
|
||||
for (char ch : id) {
|
||||
if (ch == '\\') {
|
||||
|
@ -208,7 +214,7 @@ struct ShowWorker
|
|||
str += "╲";
|
||||
continue;
|
||||
}
|
||||
if (ch == '"')
|
||||
if (ch == '"' || ch == '<' || ch == '>')
|
||||
str += "\\";
|
||||
str += ch;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue