1. A quick and dirty fix
It’s a little hacky, but putting something directly before the first macrocall will prevent the block mode parsing. That’s the primary issue, as far as I can tell: when they’re parsed in block mode, each gets wrapped in <p>...</p>, which creates the space you see.
For space-fixer elements like this, I like to use @@.e @@, which is the wikitext shortcut for <span class="e"></span>. .e stands for “empty”, and it’s never defined in my stylesheets; it’s there purely to remind me what’s going on.
@@.e @@
<<subsume "x">>
<<subsume "y">>
<<subsume "z">>
2. A CSS fix
Alternatively, you can use a single CSS rule added either to a stylesheet tiddler or to the macro itself:
p:has(details.subsume) { display: contents; }
display: contents is a CSS trick that effectively removes an element from the rendered HTML while preserving its children. So in this case, we want to remove any <p> that contains one of your subsumes.
- I added the class
subsume to both the CSS rule and the version of your macro I used for testing, but you could simplify it to p:has(details) if you want to eliminate all <p> tags wrapping <details> elements.
Here’s my slightly edited version of your macro (which I sneakily switched to a procedure). It should work with either approach, or with your approach above. You can, of course, omit the details class if you don’t need it.
\procedure subsume(tid:"")
<style>
p:has(details.subsume) { display: contents; }
</style>
<$tiddler tiddler=<<tid>> >
<details class="subsume">
<summary><$view field="title"/><$link> * </$link></summary>
<span class="indent1"><$transclude mode="block"/></span>
</details>
</$tiddler>
\end
What I changed:
- procedure-ification:
-
\define → \procedure
-
"tid" (or the variable equivalent <<__tid__>>) → <<tid>>
- line breaks and tabs for legibility — obviously not necessary!
- inline
<style>...</style> definition — only if you want it self-contained; moving the CSS to a stylesheet is technically better practice.
-
<$tiddler tiddler=<<tid>> >...</$tiddler> — wrapping the whole thing in a $tiddler widget redefines the <<currentTiddler>> variable in this context. Most TW widgets default to tiddler=<<currentTiddler>> or $tiddler=<<currentTiddler>> if these attributes aren’t otherwise specified, so changing the value of the <<currentTiddler>> lets us omit tiddler=... from $view and $tranclude and to=... from $link.
- removed
field="text" from the $transclude widget because it transcludes the text field by default.
Other than the variable changes needed for the macro —> procedure conversion, each of those bullet points is a stand-alone change, so you should be able to adopt any or none of it, as you like. 