I'm using an expression engine field to post code samples using a <pre>
element and [code]
markup, but I'm also using this field as an excerpt. In the excerpt, I want to remove anything inside these pre elements (or stop, somehow, once it reaches the <pre>
element. Anyone know how to do this? Here's my excerpt code:
<p class="excerpt">{exp:trunchtml chars="300"}{code_content}{/exp:trunchtml}</p>
and here's a sample entry containing code:
</p>Blah blah blah Lorem Ipsum</p> <pre>[code]camera.position.set(0,20,35); [/code]</pre>