Ticket #3 (closed bug: fixed)

Opened 5 years ago

Last modified 4 years ago

Templates output a blank space at the end

Reported by: s0undt3ch Assigned to: s0undt3ch
Priority: major Milestone: TracWikiTemplates-0.3.0
Component: macros Version: 0.3.0
Keywords: Cc:

Description (Last modified by s0undt3ch)

A sipple templates as:

{{{
#!html
<span style="color: #339900; font-family: monospace;">{{1}}</span>
}}}

will output a blank space at the end of this green text passed, just after the comma, should output none.

Attachments

macro.patch (1.4 kB) - added by fimion on 12-03-2006 07:40:58.
a patch for macro.py

Change History

14-10-2005 10:53:49 changed by s0undt3ch

  • status changed from new to assigned.

31-10-2005 00:56:17 changed by s0undt3ch

  • description changed.

31-10-2005 00:57:56 changed by s0undt3ch

  • description changed.

25-12-2005 22:51:28 changed by s0undt3ch

The good news is that I now know what is happening.
When html is outputed, a new line is ouputed for the text that comes after the template. Let's add some html source so you can check it:

This:

<span style="color: #339900; font-family: monospace;">Some Green Text</span>.
<br>(Notice that last dot.)

Becomes:

Some Green Text.
(Notice that last dot.)

And:

<span style="color: #339900; font-family: monospace;">Some Green Text</span>
.
<br>(Notice that last dot.)

Becomes:

Some Green Text .
(Notice that last dot.)

The latest is what happens with our TracWikiTemplates plugin, which I still don't know how to fix, and these are the bad news.

26-12-2005 11:49:57 changed by s0undt3ch

  • milestone changed from TracWikiTemplates-0.2.0 to TracWikiTemplates-1.0.0.

12-03-2006 03:18:16 changed by fimion

Perhaps you could add an option to remove all the new lines from the text after it has been formatted. make it a final optional parameter.

12-03-2006 07:40:58 changed by fimion

  • attachment macro.patch added.

a patch for macro.py

12-03-2006 07:55:59 changed by fimion

I've uploaded a patch for macro.py. to use it, simply download the patch file to your WikiTemplates? folder and use the following command:

patch -p1 < macro.patch

and there you go!

then, if you want <p> or whitespace removed, simply add {{!p}} or {{!n}} to the begining of the template.

Example can be see here: http://wpmuplugins.fimii.net/trac/wiki/Exapmles/ColoredText

14-04-2006 18:14:04 changed by s0undt3ch

  • milestone changed from TracWikiTemplates-1.0.0 to TracWikiTemplates-0.3.0.

15-04-2006 23:01:47 changed by s0undt3ch

  • priority changed from minor to major.
  • version changed from DEV to 0.2.0.
  • type changed from task to bug.
  • milestone changed from TracWikiTemplates-0.3.0 to TracWikiTemplates-0.2.1.

With r37 this ticket might be considered closed(for me ;)).

Still, I leave it open so I can get fimion to better explain that <P> problem, which I din't get what it was since whatever it is, it hasn't bugged me. So, until I can get a better explanation of the problem the 0.2.1 release is on hold.

24-04-2006 03:39:09 changed by fimion

when trying to inline text, trac will add <p> tags sometimes, causing the text to not inline properly. removing <p> tags solves this.

25-04-2006 03:59:51 changed by s0undt3ch

  • milestone changed from TracWikiTemplates-0.2.1 to TracWikiTemplates-0.3.0.

Milestone TracWikiTemplates?-0.2.1 deleted

25-04-2006 16:14:00 changed by s0undt3ch

  • status changed from assigned to closed.
  • resolution set to fixed.
  • version changed from 0.2.0 to 0.3.0.
  • component set to macro.

I can definitly say that this bug is closed on revision [42] for both subjects talked about in this ticket.

The blank spaces due to the linefeeds are removed everywhere and the html paragraph tags are removed from the start end the end of the template output.