Skip to content

Commit

Permalink
if the code part of a node is too long, truncate it.
Browse files Browse the repository at this point in the history
  • Loading branch information
timo committed Jun 17, 2013
1 parent 1729750 commit c2eba21
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/QAST/Node.nqp
Expand Up @@ -93,7 +93,11 @@ class QAST::Node {
}
if (self.node) {
nqp::push(@chunks, ' ');
nqp::push(@chunks, nqp::escape(self.node));
my $escaped_node := nqp::escape(self.node);
nqp::push(@chunks, nqp::substr($escaped_node, 0, 50));
if (nqp::chars($escaped_node) > 50) {
nqp::push(@chunks, "");
}
}
nqp::push(@chunks, "\n");
self.dump_children($indent + 2, @chunks);
Expand Down

0 comments on commit c2eba21

Please sign in to comment.