diff --git a/rich_tables/fields.py b/rich_tables/fields.py
index 83cb0e3..29ae3fe 100644
--- a/rich_tables/fields.py
+++ b/rich_tables/fields.py
@@ -41,7 +41,7 @@
snoop.install(color=True)
-MATCH_COUNT_HEADER = re.compile(r"duration|(_sum|_?count)$")
+MATCH_COUNT_HEADER = re.compile(r"duration|(_sum$|_?count$)")
# @snoop
diff --git a/rich_tables/utils.py b/rich_tables/utils.py
index 073e542..c770436 100644
--- a/rich_tables/utils.py
+++ b/rich_tables/utils.py
@@ -42,7 +42,7 @@
BOLD_GREEN = "b green"
BOLD_RED = "b red"
SECONDS_PER_DAY = 86400
-CONSECUTIVE_SPACE = re.compile("(^ +| +$)")
+CONSECUTIVE_SPACE = re.compile("((^ +)|( +$))")
# @lru_cache
diff --git a/svgs/nested_json.svg b/svgs/nested_json.svg
index a55f5b2..7daefca 100644
--- a/svgs/nested_json.svg
+++ b/svgs/nested_json.svg
@@ -19,429 +19,429 @@
font-weight: 700;
}
- .terminal-3961433100-matrix {
+ .terminal-1992602128-matrix {
font-family: Fira Code, monospace;
font-size: 20px;
line-height: 24.4px;
font-variant-east-asian: full-width;
}
- .terminal-3961433100-title {
+ .terminal-1992602128-title {
font-size: 18px;
font-weight: bold;
font-family: arial;
}
- .terminal-3961433100-r1 { fill: #c5c8c6;font-weight: bold }
-.terminal-3961433100-r2 { fill: #87ceeb }
-.terminal-3961433100-r3 { fill: #c5c8c6 }
-.terminal-3961433100-r4 { fill: #1984e9;text-decoration: underline; }
-.terminal-3961433100-r5 { fill: #868887 }
-.terminal-3961433100-r6 { fill: #868887;font-weight: bold }
-.terminal-3961433100-r7 { fill: #39bb66;font-weight: bold }
-.terminal-3961433100-r8 { fill: #9e3447;font-weight: bold }
-.terminal-3961433100-r9 { fill: #ab6e53;font-weight: bold }
-.terminal-3961433100-r10 { fill: #b8bc97;font-weight: bold }
-.terminal-3961433100-r11 { fill: #87ceeb;font-weight: bold }
-.terminal-3961433100-r12 { fill: #00823d;font-weight: bold }
-.terminal-3961433100-r13 { fill: #c19eba;font-weight: bold }
-.terminal-3961433100-r14 { fill: #a7bab4;font-weight: bold }
-.terminal-3961433100-r15 { fill: #000000 }
-.terminal-3961433100-r16 { fill: #958971;font-weight: bold }
-.terminal-3961433100-r17 { fill: #aa9477;font-weight: bold }
-.terminal-3961433100-r18 { fill: #ad8c4c;font-weight: bold }
-.terminal-3961433100-r19 { fill: #709a6c;font-weight: bold }
-.terminal-3961433100-r20 { fill: #639b50;font-weight: bold }
-.terminal-3961433100-r21 { fill: #b684cb;font-weight: bold }
-.terminal-3961433100-r22 { fill: #745fa6;font-weight: bold }
-.terminal-3961433100-r23 { fill: #3e468a }
-.terminal-3961433100-r24 { fill: #c38a48;font-weight: bold }
-.terminal-3961433100-r25 { fill: #6b824f;font-weight: bold }
-.terminal-3961433100-r26 { fill: #9560b7;font-weight: bold }
-.terminal-3961433100-r27 { fill: #8c8332;font-weight: bold }
-.terminal-3961433100-r28 { fill: #3f8a9c;font-weight: bold }
-.terminal-3961433100-r29 { fill: #81b758;font-weight: bold }
-.terminal-3961433100-r30 { fill: #76614a;font-weight: bold;text-decoration: underline; }
-.terminal-3961433100-r31 { fill: #44b39b;font-weight: bold }
-.terminal-3961433100-r32 { fill: #5392b1;font-weight: bold;text-decoration: underline; }
-.terminal-3961433100-r33 { fill: #814e68;font-weight: bold }
-.terminal-3961433100-r34 { fill: #c19baa;font-weight: bold }
-.terminal-3961433100-r35 { fill: #5e515a;font-weight: bold }
-.terminal-3961433100-r36 { fill: #a7cd81;font-weight: bold;font-style: italic; }
-.terminal-3961433100-r37 { fill: #4a8a7f;font-weight: bold }
-.terminal-3961433100-r38 { fill: #cd7ebf;font-weight: bold }
-.terminal-3961433100-r39 { fill: #6c6369;font-weight: bold }
-.terminal-3961433100-r40 { fill: #b29372;font-weight: bold }
-.terminal-3961433100-r41 { fill: #407085;font-weight: bold }
-.terminal-3961433100-r42 { fill: #4140af;font-weight: bold }
-.terminal-3961433100-r43 { fill: #c73544;font-weight: bold }
-.terminal-3961433100-r44 { fill: #444788;font-weight: bold }
-.terminal-3961433100-r45 { fill: #42a352;font-weight: bold }
-.terminal-3961433100-r46 { fill: #6864cb;font-weight: bold }
-.terminal-3961433100-r47 { fill: #77384d;font-weight: bold }
+ .terminal-1992602128-r1 { fill: #c5c8c6;font-weight: bold }
+.terminal-1992602128-r2 { fill: #87ceeb }
+.terminal-1992602128-r3 { fill: #c5c8c6 }
+.terminal-1992602128-r4 { fill: #1984e9;text-decoration: underline; }
+.terminal-1992602128-r5 { fill: #868887 }
+.terminal-1992602128-r6 { fill: #868887;font-weight: bold }
+.terminal-1992602128-r7 { fill: #39bb66;font-weight: bold }
+.terminal-1992602128-r8 { fill: #9e3447;font-weight: bold }
+.terminal-1992602128-r9 { fill: #ab6e53;font-weight: bold }
+.terminal-1992602128-r10 { fill: #b8bc97;font-weight: bold }
+.terminal-1992602128-r11 { fill: #87ceeb;font-weight: bold }
+.terminal-1992602128-r12 { fill: #00823d;font-weight: bold }
+.terminal-1992602128-r13 { fill: #c19eba;font-weight: bold }
+.terminal-1992602128-r14 { fill: #a7bab4;font-weight: bold }
+.terminal-1992602128-r15 { fill: #000000 }
+.terminal-1992602128-r16 { fill: #958971;font-weight: bold }
+.terminal-1992602128-r17 { fill: #aa9477;font-weight: bold }
+.terminal-1992602128-r18 { fill: #ad8c4c;font-weight: bold }
+.terminal-1992602128-r19 { fill: #709a6c;font-weight: bold }
+.terminal-1992602128-r20 { fill: #639b50;font-weight: bold }
+.terminal-1992602128-r21 { fill: #b684cb;font-weight: bold }
+.terminal-1992602128-r22 { fill: #745fa6;font-weight: bold }
+.terminal-1992602128-r23 { fill: #7e9773 }
+.terminal-1992602128-r24 { fill: #c38a48;font-weight: bold }
+.terminal-1992602128-r25 { fill: #6b824f;font-weight: bold }
+.terminal-1992602128-r26 { fill: #9560b7;font-weight: bold }
+.terminal-1992602128-r27 { fill: #8c8332;font-weight: bold }
+.terminal-1992602128-r28 { fill: #3f8a9c;font-weight: bold }
+.terminal-1992602128-r29 { fill: #81b758;font-weight: bold }
+.terminal-1992602128-r30 { fill: #76614a;font-weight: bold;text-decoration: underline; }
+.terminal-1992602128-r31 { fill: #44b39b;font-weight: bold }
+.terminal-1992602128-r32 { fill: #5392b1;font-weight: bold;text-decoration: underline; }
+.terminal-1992602128-r33 { fill: #814e68;font-weight: bold }
+.terminal-1992602128-r34 { fill: #c19baa;font-weight: bold }
+.terminal-1992602128-r35 { fill: #5e515a;font-weight: bold }
+.terminal-1992602128-r36 { fill: #a7cd81;font-weight: bold;font-style: italic; }
+.terminal-1992602128-r37 { fill: #4a8a7f;font-weight: bold }
+.terminal-1992602128-r38 { fill: #cd7ebf;font-weight: bold }
+.terminal-1992602128-r39 { fill: #6c6369;font-weight: bold }
+.terminal-1992602128-r40 { fill: #b29372;font-weight: bold }
+.terminal-1992602128-r41 { fill: #407085;font-weight: bold }
+.terminal-1992602128-r42 { fill: #4140af;font-weight: bold }
+.terminal-1992602128-r43 { fill: #c73544;font-weight: bold }
+.terminal-1992602128-r44 { fill: #444788;font-weight: bold }
+.terminal-1992602128-r45 { fill: #42a352;font-weight: bold }
+.terminal-1992602128-r46 { fill: #6864cb;font-weight: bold }
+.terminal-1992602128-r47 { fill: #77384d;font-weight: bold }
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
- Rich
+ Rich
-
+
-
- @context│https://schema.org╭─additionalProperty───────────────────────╮
- @id│https://gina909.bandcamp.com/track/hyper-poc│@type name value │
- @type│MusicRecording │──────────────────────────────────────────│
-copyrightNotice│Attribution │PropertyValuetrack_id3071225133│
- dateModified│25 Apr 202101:41:12 GMT │PropertyValueart_id932925975│
- datePublished│24 Apr 202100:00:00 GMT │PropertyValuelicense_nameattribution│
- duration│P00H04M42S ╰────────────────────────────────────────────╯
- image│https://f4.bcbits.com/img/a0932925975_10.jpg
- keywords│aElectronicaatechnoaateknoaatranceaaMelbournea
- name│Hyper Poc
-╭─byArtist───────────────────────────╮
-│ @id│https://gina909.bandcamp.com│
-│@type│MusicGroup │
-│ name│GINA│
-╰──────────────────────────────────────╯
-╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
-│Mastered By Madmatik Artwork by Aviss │
-╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
-╭─inAlbum────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
-│ @type│MusicAlbum │
-│albumReleaseType│SingleRelease│
-│ name│Hyper Poc│
-│ numTracks│1│
-│╭─albumRelease───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮│
-││││
-││├── @id: https://gina909.bandcamp.com/track/hyper-poc││
-││├── @type: MusicReleaseProduct││
-││├── @type name value ││
-│││ ────────────────────────────────────────────││
-│││ PropertyValueitem_id3071225133││
-│││ PropertyValueitem_typet ││
-│││ PropertyValueselling_band_id872247837││
-│││ PropertyValuetype_nameDigital ││
-│││ PropertyValueart_id932925975││
-││├── ╭─description────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮││
-│││ │Includes high-quality download in MP3, FLAC and more. Paying supporters also get unlimited streaming via the free Bandcamp app. │││
-│││ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯││
-││├── image: https://f4.bcbits.com/img/a0932925975_10.jpg││
-││├── musicReleaseFormat: DigitalFormat ││
-││├── name: Hyper Poc││
-││└── @type│Offer ││
-││ availability│OnlineOnly ││
-││ price│3││
-││priceCurrency│AUD ││
-││ url│https://gina909.bandcamp.com/track/hyper-poc#t3071225133-buy││
-││╭─additionalProperty──────────────╮││
-│││@type name value│││
-│││─────────────────────────────────│││
-│││PropertyValuemax_price1000│││
-││╰───────────────────────────────────╯││
-││╭─priceSpecification─╮││
-│││minPrice│3│││
-││╰──────────────────────╯││
-│╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯│
-╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
-╭─publisher──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
-│ @id│https://gina909.bandcamp.com╭─additionalProperty──────────────────────────╮│
-│@type│MusicGroup │@type name value ││
-│genre│https://bandcamp.com/tag/electronic│─────────────────────────────────────────────││
-│image│https://f4.bcbits.com/img/0020586851_10.jpg│PropertyValueband_id872247837││
-│ name│GINA│PropertyValuecurrencyAUD ││
-││PropertyValuehas_any_downloadsTrue││
-││PropertyValueimage_height2829││
-││PropertyValueimage_id20586851││
-││PropertyValueimage_width2829││
-│╰───────────────────────────────────────────────╯│
-│╭─foundingLocation──────────╮│
-││@type│Place ││
-││ name│AustraliaMelbourne││
-│╰─────────────────────────────╯│
-│╭─mainEntityOfPage─────────────────────────────────────────╮│
-││@type name url ││
-││──────────────────────────────────────────────────────────││
-││WebPageSoundCloudhttps://soundcloud.com/gina909││
-││WebPageInstagramhttps://www.instagram.com/boygina_/││
-│╰────────────────────────────────────────────────────────────╯│
-│╭─subjectOf─────────────────────────────────────────────────────────────────────────────────────╮│
-││@type additionalProperty name url ││
-││───────────────────────────────────────────────────────────────────────────────────────────────││
-││WebPage@type name valuemusichttps://gina909.bandcamp.com/music││
-││────────────────────────────────││
-││PropertyValuenav_typem ││
-││WebPage@type name valuecommunityhttps://gina909.bandcamp.com/community││
-││────────────────────────────────││
-││PropertyValuenav_typec ││
-│╰─────────────────────────────────────────────────────────────────────────────────────────────────╯│
-╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+
+ @context│https://schema.org╭─additionalProperty───────────────────────╮
+ @id│https://gina909.bandcamp.com/track/hyper-poc│@type name value │
+ @type│MusicRecording │──────────────────────────────────────────│
+copyrightNotice│Attribution │PropertyValuetrack_id3071225133│
+ dateModified│25 Apr 202101:41:12 GMT │PropertyValueart_id932925975│
+ datePublished│24 Apr 202100:00:00 GMT │PropertyValuelicense_nameattribution│
+ duration│P00H04M42S ╰────────────────────────────────────────────╯
+ image│https://f4.bcbits.com/img/a0932925975_10.jpg
+ keywords│aElectronicaatechnoaateknoaatranceaaMelbournea
+ name│Hyper Poc
+╭─byArtist───────────────────────────╮
+│ @id│https://gina909.bandcamp.com│
+│@type│MusicGroup │
+│ name│GINA│
+╰──────────────────────────────────────╯
+╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
+│Mastered By Madmatik Artwork by Aviss │
+╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+╭─inAlbum────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
+│ @type│MusicAlbum │
+│albumReleaseType│SingleRelease│
+│ name│Hyper Poc│
+│ numTracks│1│
+│╭─albumRelease───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮│
+││││
+││├── @id: https://gina909.bandcamp.com/track/hyper-poc││
+││├── @type: MusicReleaseProduct││
+││├── @type name value ││
+│││ ────────────────────────────────────────────││
+│││ PropertyValueitem_id3071225133││
+│││ PropertyValueitem_typet ││
+│││ PropertyValueselling_band_id872247837││
+│││ PropertyValuetype_nameDigital ││
+│││ PropertyValueart_id932925975││
+││├── ╭─description────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮││
+│││ │Includes high-quality download in MP3, FLAC and more. Paying supporters also get unlimited streaming via the free Bandcamp app. │││
+│││ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯││
+││├── image: https://f4.bcbits.com/img/a0932925975_10.jpg││
+││├── musicReleaseFormat: DigitalFormat ││
+││├── name: Hyper Poc││
+││└── @type│Offer ││
+││ availability│OnlineOnly ││
+││ price│3││
+││priceCurrency│AUD ││
+││ url│https://gina909.bandcamp.com/track/hyper-poc#t3071225133-buy││
+││╭─additionalProperty──────────────╮││
+│││@type name value│││
+│││─────────────────────────────────│││
+│││PropertyValuemax_price1000│││
+││╰───────────────────────────────────╯││
+││╭─priceSpecification─╮││
+│││minPrice│3│││
+││╰──────────────────────╯││
+│╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯│
+╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
+╭─publisher──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
+│ @id│https://gina909.bandcamp.com╭─additionalProperty──────────────────────────╮│
+│@type│MusicGroup │@type name value ││
+│genre│https://bandcamp.com/tag/electronic│─────────────────────────────────────────────││
+│image│https://f4.bcbits.com/img/0020586851_10.jpg│PropertyValueband_id872247837││
+│ name│GINA│PropertyValuecurrencyAUD ││
+││PropertyValuehas_any_downloadsTrue││
+││PropertyValueimage_height2829││
+││PropertyValueimage_id20586851││
+││PropertyValueimage_width2829││
+│╰───────────────────────────────────────────────╯│
+│╭─foundingLocation──────────╮│
+││@type│Place ││
+││ name│AustraliaMelbourne││
+│╰─────────────────────────────╯│
+│╭─mainEntityOfPage─────────────────────────────────────────╮│
+││@type name url ││
+││──────────────────────────────────────────────────────────││
+││WebPageSoundCloudhttps://soundcloud.com/gina909││
+││WebPageInstagramhttps://www.instagram.com/boygina_/││
+│╰────────────────────────────────────────────────────────────╯│
+│╭─subjectOf─────────────────────────────────────────────────────────────────────────────────────╮│
+││@type additionalProperty name url ││
+││───────────────────────────────────────────────────────────────────────────────────────────────││
+││WebPage@type name valuemusichttps://gina909.bandcamp.com/music││
+││────────────────────────────────││
+││PropertyValuenav_typem ││
+││WebPage@type name valuecommunityhttps://gina909.bandcamp.com/community││
+││────────────────────────────────││
+││PropertyValuenav_typec ││
+│╰─────────────────────────────────────────────────────────────────────────────────────────────────╯│
+╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯