JimmyCushnie / JECS

Jimmy's Epic Config System

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow multi-line strings to have a newline in the file without having a newline in the string

JimmyCushnie opened this issue · comments

It is awkward to work with files which have very long strings without line breaks. There should be a way to break the line in the file without changing the returned string when it is loaded by SUCC.

One option is to have a character at the end of lines which tells the parser to ignore the line breaks.

Current:

Message: """
    What the fuck did you just fucking say about me, you little bitch? I'll have you know I graduated top of my class in the Navy Seals, and I've been involved in numerous secret raids on Al-Quaeda, and I have over 300 confirmed kills. I am trained in gorilla warfare and I'm the top sniper in the entire US armed forces. You are nothing to me but just another target. I will wipe you the fuck out with precision the likes of which has never been seen before on this Earth, mark my fucking words. You think you can get away with saying that shit to me over the Internet? Think again, fucker. As we speak I am contacting my secret network of spies across the USA and your IP is being traced right now so you better prepare for the storm, maggot. The storm that wipes out the pathetic little thing you call your life. You're fucking dead, kid. I can be anywhere, anytime, and I can kill you in over seven hundred ways, and that's just with my bare hands. Not only am I extensively trained in unarmed combat, but I have access to the entire arsenal of the United States Marine Corps and I will use it to its full extent to wipe your miserable ass off the face of the continent, you little shit. If only you could have known what unholy retribution your little "clever" comment was about to bring down upon you, maybe you would have held your fucking tongue. But you couldn't, you didn't, and now you're paying the price, you goddamn idiot. I will shit fury all over you and you will drown in it. You're fucking dead, kiddo.
    """

Desired:

Message: """
    What the fuck did you just fucking say about me, you little bitch? \
    I'll have you know I graduated top of my class in the Navy Seals, \
    and I've been involved in numerous secret raids on Al-Quaeda, and \
    I have over 300 confirmed kills. I am trained in gorilla warfare \
    and I'm the top sniper in the entire US armed forces. You are nothing \
    to me but just another target. I will wipe you the fuck out with \
    precision the likes of which has never been seen before on this Earth, \
    mark my fucking words. You think you can get away with saying that \
    shit to me over the Internet? Think again, fucker. As we speak I am \
    contacting my secret network of spies across the USA and your IP is \
    being traced right now so you better prepare for the storm, maggot. \
    The storm that wipes out the pathetic little thing you call your life. \
    You're fucking dead, kid. I can be anywhere, anytime, and I can kill \
    you in over seven hundred ways, and that's just with my bare hands. \
    Not only am I extensively trained in unarmed combat, but I have \
    access to the entire arsenal of the United States Marine Corps and \
    I will use it to its full extent to wipe your miserable ass off the \
    face of the continent, you little shit. If only you could have known \
    what unholy retribution your little "clever" comment was about to bring \
    down upon you, maybe you would have held your fucking tongue. But you \
    couldn't, you didn't, and now you're paying the price, you goddamn idiot. \
    I will shit fury all over you and you will drown in it. You're fucking \
    dead, kiddo.
    """

Another option would be to pull a markdown: ignore single newlines, and treat double newlines as a single newline.

Resolved in b8105d0 , using the initially proposed method. If a multi-line string contains a line that actually ends with a \, that line will be quoted, similarly to if a line ends with a space.