Forum:Need help figuring out a template/parser function problem

I spent a couple of hours today trying to make this template automatically create links for parameters 1, 2, and 3. I couldn't find anything that said you can't put and  inside the  function, but it always output something that looked like this:

]] ]]
 * [[Hart Hills
 * [[Hawklor

instead of:


 * Hart Hills
 * Hawklor

The only explanation I could think of was that it's somehow including a line break as part of the parameters. If so, why? Or is there something else I'm missing? Thanks! Psychoadept (talk) 06:28, August 1, 2012 (UTC)


 * I don't understand what the problem is?




 * makes


 * which looks fine to me. Is what you're trying to do different / more complex than this? If so, please post the exact snippet of code that you tried (not the entire template code -- just the small part that's causing the problem).


 * Here's the code in question (the first layer of the list is a required parameter, included just prior to this):




 * What I tried that didn't work was this:




 * Psychoadept (talk) 07:12, August 1, 2012 (UTC)


 * Sorry, just to verify, can you also link me to a page that uses this template where it's not working properly? As far as I can tell, your template appears to be working just fine. For example, on your w:c:sryth:Westwold page, I am seeing this.


 * Edit: I've finished doing a bit more tinkering now. Check out http://mathmagician.wikia.com/wiki/Template:Test2?oldid=5375 and http://mathmagician.wikia.com/wiki/Template:Test3?oldid=5377, these might be able to help you figure out the linebreak issue. In particular, my Test3 template makes use of wikipedia:Template:Trim, which is used for trimming whitespace in templates.