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 ~Hart Hills~@http://mathmagician.wikia.com/wiki/Template:Test2?oldid=5375@ and ~Hart Hills~@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.


 * Fantastic, thanks! That trim template is exactly what I needed. For organizational clarity, it's best if I can keep the separate lines. Psychoadept (talk) 14:58, August 1, 2012 (UTC)


 * Okay, I imported wikipedia:Template:Trim and it's working, but the and  are still rendering as text instead of creating a link. As far as I can tell I've copied your code exactly. Psychoadept (talk) 15:10, August 1, 2012 (UTC)


 * Fixed Trim, also this edit was mine but I forgot to login. Everything seems to be working now?


 * Looks great, thanks again! Psychoadept (talk) 16:34, August 1, 2012 (UTC)