From 2bd9a6953c3eb8227dbd3354259ad9d0b251395c Mon Sep 17 00:00:00 2001 From: Keegan McAllister Date: Tue, 16 Oct 2012 01:45:37 -0400 Subject: [PATCH] django-template-graph: Replace slashes with newlines Makes the graph fit better on the screen. (imported from commit 7d42caca478634143c6b291f47a4642acfdd1128) --- tools/django-template-graph | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/django-template-graph b/tools/django-template-graph index 58e5a8b0b7..67484d765b 100755 --- a/tools/django-template-graph +++ b/tools/django-template-graph @@ -7,8 +7,9 @@ cd "$(dirname "$0")"/../templates ( echo 'digraph {' for t in $(find -name '*.html' -printf '%P\n'); do - echo "\"$t\";" - perl -lne 'print "\"'"$t"'\" -> \"$1\";" if m/{%\s*extends\s*"([^"]+)"/' "$t" + echo "\"$t\";" | sed 's|/|\\n|g' + perl -lne 'print "\"'"$t"'\" -> \"$1\";" if m/{%\s*extends\s*"([^"]+)"/' "$t" \ + | sed 's|/|\\n|g' done echo '}' ) > graph.dot