• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

JASS Tag copy bug

Status
Not open for further replies.
Level 13
Joined
Sep 13, 2010
Messages
550
As the title says, when I copy stuff in jass tags from a post, it just ignores the new lines( before the snow theme too ), and the whole stuff will be copied as one line. I don't know why, before it was working. I am using Nightly( some sort of firefox ).

JASS:
library AnotherLibrary initializer InfiniteLoop requires Test

    function Loop takes nothing returns nothing
        call BJDebugMsg( I2S( GetEnumInteger( ) ) )
    endfunction

    function InfiniteLoop takes nothing returns nothing
        call ClearTextMessages( )
        call BunchONumbers.GenNumbers( 10 )
        call ForEachInteger( function Loop )
        call TriggerSleepAction( 0 )
        call ExecuteFunc( "InfiniteLoop" )
    endfunction

endlibrary

JASS:
library AnotherLibrary initializer InfiniteLoop requires Test     function Loop takes nothing returns nothing         call BJDebugMsg( I2S( GetEnumInteger( ) ) )     endfunction     function InfiniteLoop takes nothing returns nothing         call ClearTextMessages( )         call BunchONumbers.GenNumbers( 10 )         call ForEachInteger( function Loop )         call TriggerSleepAction( 0 )         call ExecuteFunc( "InfiniteLoop" )     endfunction endlibrary
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
Just reporting it still bugs, Im on windows 7 x86 and Im using Mozilla Firefox 17.0.1 and when I try to copy all text between [code=jass][/code] tags it puts it to one line, if I dont copy 1 single letter from the end(lets say y from endlibrary) it works fine tho.
And to prove its not Internal system bug, on Wc3c it works normally(I copied TimerUtils recently and it didnt bug)
 
Level 31
Joined
Jul 10, 2007
Messages
6,306
Sounds like this is the problem

\n = CR (Carriage Return) // Used as a new line character in Unix
\r = LF (Line Feed) // Used as a new line character in Mac OS
\r\n = CR + LF // Used as a new line character in Windows

more specifics on mac
\n = LF = 0x0A (10 in decimal) new line in linux/unix/Mac OS X.
\r = CR = 0x0D (13 in decimal) new line in Mac OSes from the 80s and 90s (e.g., apple II through Mac OS-9)

so just always use \r\n, lol
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
I dont think it is the cause, because if I dont copy all the code, if I leave 1 single character(y from endlibrary lets say) than it works but if I copy even the last(or first, it doesnt matter, I cant leave L from Library keyword at the very top of the Jass tag) it bugs out and outputs it in 1 line
 

Ralle

Owner
Level 77
Joined
Oct 6, 2004
Messages
10,101
I have been testing and these are my results:
Windows:
- Internet Explorer 9 works
- Chrome works
- Firefox 18 (does not work)
Mac
- Safari works
- Chrome works
- Firefox 18 (does not work)

I will see if I can fix it.

EDIT:
Here's a bug report about exactly our issue: https://bugzilla.mozilla.org/show_bug.cgi?id=116083

EDIT:
A fix has been applied. Firefox 18 has been tested on Mac and Windows and seems to work now. Please verify this.
 
Status
Not open for further replies.
Top