From 815235f9b8bb90bbc87f4db28e4618c0ba548c40 Mon Sep 17 00:00:00 2001 From: "Benjamin J. Culkin" Date: Sat, 28 Oct 2017 23:23:41 -0300 Subject: More work on spacing This should fix most of the spacings issues with ' and " --- RGens/src/main/java/bjc/rgens/newparser/RGrammar.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'RGens/src') diff --git a/RGens/src/main/java/bjc/rgens/newparser/RGrammar.java b/RGens/src/main/java/bjc/rgens/newparser/RGrammar.java index 91ef668..a01aea4 100644 --- a/RGens/src/main/java/bjc/rgens/newparser/RGrammar.java +++ b/RGens/src/main/java/bjc/rgens/newparser/RGrammar.java @@ -190,8 +190,9 @@ public class RGrammar { * This can be done in the grammars, but it is very tedious to * do so. */ - body = body.replaceAll(" ([,:.)\\]]) ", "$1 "); - body = body.replaceAll(" (['\"(\\[]) ", " $1"); + body = body.replaceAll(" 's ", "'s "); + body = body.replaceAll(" ([,:.)\\]'\"]) ", "$1 "); + body = body.replaceAll(" (`[(\\[]) ", " $1"); body = body.replaceAll("\\s?([-/])\\s?", "$1"); return body; -- cgit v1.2.3