My fields look like this, with the term “Enterprise” in between //...//
:
log-entry-1: Captain James T. Kirk@Captain's log, Stardate: 1514.1. The //Enterprise// is in tow; to this point, no resistance has been offered. My plan: a show of resignation. Balok's tractor beam has to be a heavy drain of power on a small ship. Question: Will he grow careless?
log-entry-2: Mr. Spock@Captain's log, stardate: 1673.1, entry made by First Officer Spock. Captain Kirk retains command of this vessel, but his force of will rapidly fading. Condition of landing party critical. Transporter unit still under repair.
Which should be parsed like this:
<$list filter="[<currentTiddler>fields[]prefix[log-entry]]" variable="entry">
<$set name="log" value={{{ [all[current]get<entry>split[@]nth[2]] }}}>
<span class="tta-entry">"<<log>>"</span>
</$set>
<$set name="author" value={{{ [all[current]get<entry>split[@]nth[1]] }}}>
<span class="tta-author">~ <<author>></span>
</$set>
</$list>
Add some CSS:
.tta-entry, .tta-author {
display: block;
}
.tta-entry {
font-style: italic;
text-align: justify;
}
.tta-entry em {
font-style: normal;
}
.tta-author {
text-align: right;
}
Expected output, where the term “Enterprise” is not in italics, but the rest is:
"Captain’s log, Stardate: 1514.1. The Enterprise is in tow; to this point, no resistance has been offered. My plan: a show of resignation. Balok’s tractor beam has to be a heavy drain of power on a small ship. Question: Will he grow careless?"
~ Captain James T. Kirk <! - - aligned to the right - - >
“Captain’s log, stardate: 1673.1, entry made by First Officer Spock. Captain Kirk retains command of this vessel, but his force of will rapidly fading. Condition of landing party critical. Transporter unit still under repair.”
~ Mr. Spock <! - - aligned to the right - - >