SilverKnightVGM / pywright

Automatically exported from code.google.com/p/pywright
0 stars 0 forks source link

Word wrapping fails if " are in the text. #138

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
"{c090}Type "{c940}set show_gant1D true{c090}" after this."

Original issue reported on code.google.com by saluk64007@gmail.com on 29 Aug 2013 at 7:17

GoogleCodeExporter commented 9 years ago

Original comment by saluk64007@gmail.com on 29 Aug 2013 at 7:17

GoogleCodeExporter commented 9 years ago
if you mean it crash or doesn't run, maybe the " inside the text isn't escape 
causing python to fail you could try using ' instead of "

try:
"{c090}Type \"{c940}set show_gant1D true{c090}\" after this."

it could be some problem like a eval problem*, when you read from a file with 
that line, it would be something like:
'"{c090}Type "{c940}set show_gant1D true{c090}" after this."'
and eval it would make it (read more about python if you don't understand this):
"{c090}Type "{c940}set show_gant1D true{c090}" after this."

on the other hand, if you mean it isn't wrapping right, then maybe something is 
messing with the text, you could also try using ' instead of "

*normally, " would show up if it read from file without removing them so eval** 
would remove them or some other code remove them but mess up somewhere and 
cause a crash

**there too much code for me to pinpoint the problem nor the part on where the 
loading of the script is done.

don't mind me, i am just a random somebody who appear and comment on python project, even when i know nothing about the project.


Original comment by `free.for.all.to.use.z@gmail.com` on 8 Sep 2013 at 7:18
GoogleCodeExporter commented 9 years ago
Haha, well thanks for stopping by. Unfortunately the code you have attempted to 
correct is not written in python, but in "wrightscript", a scripting language 
this program interprets. It is perfectly legal to have quotes inside of other 
quotes, as the string is interpreted to the end of the line. The outer quotes 
are special, and any characters are allowed between them. The issue is probably 
buried somewhere inside the text printing routines, although it may have been a 
user error as well. This was a line that appeared in someone's game using the 
engine.

Original comment by saluk64007@gmail.com on 11 Sep 2013 at 7:23

GoogleCodeExporter commented 9 years ago

Original comment by saluk64007@gmail.com on 16 Jan 2014 at 11:23

GoogleCodeExporter commented 9 years ago
Could not reproduce in 0.988 with the test code listed

Original comment by saluk64007@gmail.com on 24 Jan 2014 at 7:35