hmmlconv.c: Fix-up \-escaping

hmml_to_html.c: More concisely set QuoteDir
This commit is contained in:
Matt Mascarenhas 2017-04-30 04:20:31 +01:00
parent c78193b74f
commit f371e656dc
2 changed files with 3 additions and 6 deletions

View File

@ -358,15 +358,11 @@ StringToInt(char *String)
int
BuildQuote(quote_info *Info, char *Speaker, int ID)
{
char *QuoteDir;
char *QuoteDir = "/home/matt/git/GitHub/insofaras/25fc16d58a297a486334";
if(!StringsDiffer(Speaker, "handmade_hero"))
{
QuoteDir = "/home/matt/git/GitHub/Chronister/01e754a09fd84c839ad7";
}
else
{
QuoteDir = "/home/matt/git/GitHub/insofaras/25fc16d58a297a486334";
}
char Path[255] = {0};
sprintf(Path, "%s/#%s", QuoteDir, Speaker);

View File

@ -248,7 +248,8 @@ void ProcessAnnotation(char *Line, FILE *OutFile)
// Escape stuff
else if(*LinePtr == ']' ||
(LinePtr[0] == '\\' && LinePtr[1] != '"') ||
*LinePtr == '[' ||
*LinePtr == '\\' ||
(LinePtr > Line && LinePtr[-1] == ' ' && strchr(":~@", LinePtr[0]) && !IsAlNum(LinePtr[1])))
{
fprintf(OutFile, "%.*s\\", (int)(LinePtr - RunStart), RunStart);