From: SourceForge.net <no...@so...> - 2008-11-20 16:04:52
|
Bugs item #1816661, was opened at 2007-10-19 12:37 Message generated for change (Comment added) made by eddyanthony You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=384719&aid=1816661&group_id=25576 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Export Character Group: To be fixed For 5.16.0 Status: Open Resolution: None Priority: 5 Private: No Submitted By: charles (chuckhazard) Assigned to: Martijn Verburg (karianna) Summary: Filters should not insert whitespace (" " or \n) into output Initial Comment: Starting a filter sends a newline to the output, so if you were to have the OS: --- begin innate spells |%SPELLLISTBOOK.0.0.1| innate spell stuff |%| --- end innate spells Your output for a race without innate spells would be: --- begin innate spells --- end innate spells This is counter-intuitive to me, as the filter is non printing it shouldn't send any output to the sheet just like a FOR tag doesn't take up any space. Also, if a filter is processed, the end filter tag |%| also takes up a newline. Using the example above, output for a race WITH innate spells would be: --- begin innate spells innate spell stuff --- end innate spells ---------------------------------------------------------------------- >Comment By: Eddy Anthony (eddyanthony) Date: 2008-11-20 11:04 Message: Just to note: one problem with enclosing stuff with MANUALWHITESPACE is that you have to add spaces back with a ---------------------------------------------------------------------- Comment By: Martijn Verburg (karianna) Date: 2008-11-20 10:26 Message: *Smacks Head* OK, they don't produce an actual Newline because in HTML you have to use a <br> tag, but the call to create the new line does introduce that space, although it doesn't really :). If you look at the source produced, it does not introduce a space, I believe it is actually the browser that does so (both FF and IE seem to do this). Not sure if this is 'solvable', it might have to be a case of wrapping affected areas in MANUALWHITESPACE tags in order to control what the output should look like. This whole area is an exercise in frustration, will be much better when we move to a real templating engine. ---------------------------------------------------------------------- Comment By: Martijn Verburg (karianna) Date: 2008-11-20 09:59 Message: Hmm, interesting, it appears that a Newline is being called by the ExportHandler after it processes certain 'things', but appears to be outputting a " " as opposed to a true newline. By commenting out that line the spaces went away, but they also did in places where we do need spaces :). If it was behaving as intended/coded then the output would actually look even stranger, for example instead of: ( human ) you'd get: ( human ) Now the newline call is actually a default Java API call, so this definitely will get interesting. ---------------------------------------------------------------------- Comment By: Martijn Verburg (karianna) Date: 2008-11-20 08:51 Message: Amended tracker title to cover both cases, am investigating as well (it's _nasty_), looks like we ahve plenty of formatting code in the core of PCGen (as opposed to the ExportHandler and below), so it's going to be a non trivial fix. ---------------------------------------------------------------------- Comment By: Eddy Anthony (eddyanthony) Date: 2008-11-13 10:29 Message: Just to note, this tracker is about the OS tokens inserting unwanted returns, my comment below is from a tracker I opened which was marked as a duplicate of this. However the problem I am seeing is the OS tokens inserting unwanted 'space' characters. Seems like the problems may be related but if not please reopen the other tracker: New lines produce unwanted spaces in output https://sourceforge.net/tracker/?func=detail&atid=384719&aid=2276453&group_id=25576 ---------------------------------------------------------------------- Comment By: Eddy Anthony (eddyanthony) Date: 2008-11-13 09:10 Message: To demonstrate create a human character and view the statblock4 sheet, here is the third line: TN medium humanoid ( human ) Note the spaces on either side of "human" within the parentheses. Here is the relevant code from the sheet: |ALIGNMENT.SHORT| |TEXT.LOWER.SIZELONG| |IIF(RACETYPE:None)| |TEXT.LOWER.TYPE| |ELSE| |TEXT.LOWER.RACETYPE| |ENDIF| |IIF(VAR.IF(var("COUNT[RACESUBTYPES]")==0;1;0):1)| |ELSE| ( |FOR,%subtype,0,COUNT[RACESUBTYPES]-2,1,1| |TEXT.LOWER.RACESUBTYPE.%subtype|, |ENDFOR| |FOR,%subtype,COUNT[RACESUBTYPES]-1,COUNT[RACESUBTYPES]-1,1,1| |TEXT.LOWER.RACESUBTYPE.%subtype| |ENDFOR| ) |ENDIF| <br> ---------------------------------------------------------------------- Comment By: Eddy Anthony (eddyanthony) Date: 2008-07-15 15:37 Message: Logged In: YES user_id=886893 Originator: NO This is a code bug or FREQ, moving. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=384719&aid=1816661&group_id=25576 |