Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×I'm looking to remove the em dash that precedes the page excerpt in my content by label macro output.
I've added CSS to
When I look at the page in HTML I see that em dash is enclosed with the excerpt content. How does it get there and how can I remove it?
Goal appearance is:
Page title
Excerpt text below.
Hi @Kim Wallace
The '-' character is part of the Content by Label Macro output to separate the title and the page excerpt.
You might be able to remove the dash by using the following JavaScript code within an HTML macro in the same page.
<script type="text/javascript">
AJS.toInit(function(){
AJS.$('ul.content-by-label.conf-macro.output-block > li > div.details > span.smalltext').each(function(){
if($( this ).text().startsWith('— ')){
var currentText = $( this ).html();
$( this ).html(currentText.substring(2));
}
});
});
</script>
I hope that helps.
Kind regards,
Thiago Masutti
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.