A percent sign followed by a space or placed at the end of the line will be parsed...
authorAri Johnson <ari@cobramush.org>
Wed, 21 Feb 2007 04:47:48 +0000 (04:47 +0000)
committerAri Johnson <ari@cobramush.org>
Wed, 21 Feb 2007 04:47:48 +0000 (04:47 +0000)
src/parse.c

index f99957ecf55ecbd414d7c4c56fb5ff983b2bf7c5..ea2004467019f2cbd3c7b711871a7619f4708d53 100644 (file)
@@ -716,8 +716,11 @@ process_expression(char *buff, char **bp, char const **str,
 
        (*str)++;
        savec = **str;
-       if (!savec)
+       if (!savec) {
+         /* Line ended in %, so treat it as a literal */
+         safe_chr('%', buff, bp);
          goto exit_sequence;
+       }
        savepos = *bp;
        (*str)++;
 
@@ -725,6 +728,9 @@ process_expression(char *buff, char **bp, char const **str,
        case '%':               /* %% - a real % */
          safe_chr('%', buff, bp);
          break;
+       case ' ':               /* "% " for more natural typing */
+         safe_str("% ", buff, bp);
+         break;
        case '!':               /* executor dbref */
          safe_dbref(executor, buff, bp);
          break;