Commit 91a4eeb0 authored by Philip Makedonski's avatar Philip Makedonski
Browse files

+ additional fixes for spacing issues in TPD descriptions #63

parent dbfbd28b
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -394,7 +394,10 @@ public class Generator {
			for (TestObjectiveVariant v : sto.getVariants().getVariants()) {
				variants.put(v.getName(), new LinkedHashMap<>());
				if (v.getDescription() != null) {
					variants.get(v.getName()).put("Description", v.getDescription());
					variants.get(v.getName()).put("Description", v.getDescription()
							.replaceAll("\"", "")
							.replaceAll("\\s*\n\\s+", " ")
							);
				}
				if (!v.getObjectiveURI().isEmpty()) {
					variants.get(v.getName()).put("Reference", String.join("\n",v.getObjectiveURI()));
@@ -546,7 +549,10 @@ public class Generator {
		//TODO: transfer to variants as well
		LinkedHashMap<String,String> map = new LinkedHashMap<>();
		map.put(Placeholders.NAME, sto.getName());
		map.put(Placeholders.DESCRIPTION, sto.getDescription().replaceAll("\"", ""));
		map.put(Placeholders.DESCRIPTION, sto.getDescription()
				.replaceAll("\"", "")
				.replaceAll("\\s*\n\\s+", " ")
				);
		String uri = String.join("\n", sto.getObjectiveURI()).trim();
		map.put(Placeholders.URI, uri.replaceAll("\"",""));
		TestConfiguration configuration = sto.getConfiguration();
@@ -632,7 +638,7 @@ public class Generator {
				.replaceAll(" entity ", " ") //shall be optional
				.replaceAll("\\^", "") //shall be optional
				.replaceAll(";", "") //shall be optional
				.replaceAll("\\(|\\)", "") //shall be optional
//				.replaceAll("\\(|\\)", "") //shall be optional
				;
		return source;
	}