<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository macports-contrib.
</pre>
<p><a href="https://github.com/macports/macports-contrib/commit/e8eb1a140c8658bbb85c0a7d40f8543d85262653">https://github.com/macports/macports-contrib/commit/e8eb1a140c8658bbb85c0a7d40f8543d85262653</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit e8eb1a140c8658bbb85c0a7d40f8543d85262653
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Thu Jul 11 09:36:38 2019 +1000
<span style='display:block; white-space:pre;color:#404040;'> portindex2json: use 'join' to flatten lists
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> The custom regex only removed braces, which is only one of the forms of
</span><span style='display:block; white-space:pre;color:#404040;'> quoting that Tcl may use in a list. Also flatten description, not just
</span><span style='display:block; white-space:pre;color:#404040;'> long_description.
</span>---
portindex2json/portindex2json.tcl | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/portindex2json/portindex2json.tcl b/portindex2json/portindex2json.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 0977a25..68327f3 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/portindex2json/portindex2json.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/portindex2json/portindex2json.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -72,10 +72,6 @@ proc is_closedmaintainer {maintainers} {
</span> return true
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-proc remove_extra_braces {text} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return [regsub -all {[\{\}]} $text ""]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> proc print_usage {} {
puts stdout ""
puts stdout "Usage:"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -151,8 +147,8 @@ while {[gets $fd line] >= 0} {
</span> } elseif {$key eq "maintainers"} {
set json_portinfo($key) [parse_maintainers $portinfo($key)]
set json_portinfo(closedmaintainer) [is_closedmaintainer $portinfo($key)]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {$key eq "long_description"} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set json_portinfo($key) [::json::write string [remove_extra_braces $portinfo($key)]]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } elseif {$key eq "description" || $key eq "long_description"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set json_portinfo($key) [::json::write string [join $portinfo($key)]]
</span> } else {
set json_portinfo($key) [::json::write string $portinfo($key)]
}
</pre><pre style='margin:0'>
</pre>