Repository: decorators-squad/eo-yaml (java)

Issue:
Fix value escaping
Escaping of values doesn't work well. For instance, the following YAML

```yaml
color: '#124fff'
```

is parsed as 

```yaml
color: `
```
The parser thinks that the rest of the value is a YAML comment.

Pull request description:
escape value with apostrophes as well
fixes #193 

Patch:
diff --git a/src/main/java/com/amihaiemil/eoyaml/NoCommentsYamlLine.java b/src/main/java/com/amihaiemil/eoyaml/NoCommentsYamlLine.java
index 0f0cb1e..d1baf7f 100644
--- a/src/main/java/com/amihaiemil/eoyaml/NoCommentsYamlLine.java
+++ b/src/main/java/com/amihaiemil/eoyaml/NoCommentsYamlLine.java
@@ -71,6 +71,11 @@ final class NoCommentsYamlLine implements YamlLine {
                 while(i < trimmed.length() && trimmed.charAt(i) != '"') {
                     i++;
                 }
+            } else if(trimmed.charAt(i) == '\'') {
+                i++;
+                while(i < trimmed.length() && trimmed.charAt(i) != '\'') {
+                    i++;
+                }
             }
             i++;
         }


Test patch:
diff --git a/src/test/java/com/amihaiemil/eoyaml/NoCommentsYamlLineTest.java b/src/test/java/com/amihaiemil/eoyaml/NoCommentsYamlLineTest.java
index 7824bb5..10cfd6d 100644
--- a/src/test/java/com/amihaiemil/eoyaml/NoCommentsYamlLineTest.java
+++ b/src/test/java/com/amihaiemil/eoyaml/NoCommentsYamlLineTest.java
@@ -99,10 +99,10 @@ public final class NoCommentsYamlLineTest {
     @Test
     public void trimsCommentsAtEndOfLineWithoutQuotes() {
         YamlLine noComments = new NoCommentsYamlLine(
-            new RtYamlLine("  this isn't comment   #here is the comment", 1)
+            new RtYamlLine("  this isnt a comment   #here is the comment", 1)
         );
         MatcherAssert.assertThat(
-            noComments.trimmed(), Matchers.is("this isn't comment")
+            noComments.trimmed(), Matchers.is("this isnt a comment")
         );
     }
 
@@ -124,12 +124,25 @@ public final class NoCommentsYamlLineTest {
      * NoCommentsYamlLine doesn't remove escaped # in a string.
      */
     @Test
-    public void doesNotTrimsEscapedHash() {
+    public void doesNotTrimQuotesEscapedHash() {
         YamlLine noComments = new NoCommentsYamlLine(
-            new RtYamlLine(" \"value = #5\" ", 2)
+            new RtYamlLine("  value: \"this isn't mambo #5\" ", 2)
         );
         MatcherAssert.assertThat(
-            noComments.trimmed(), Matchers.is("\"value = #5\"")
+            noComments.trimmed(), Matchers.is("value: \"this isn't mambo #5\"")
+        );
+    }
+    
+    /**
+     * NoCommentsYamlLine doesn't remove escaped # in a string.
+     */
+    @Test
+    public void doesNotTrimApostropheEscapedHash() {
+        YamlLine noComments = new NoCommentsYamlLine(
+            new RtYamlLine("  value: '#5' ", 2)
+        );
+        MatcherAssert.assertThat(
+            noComments.trimmed(), Matchers.is("value: '#5'")
         );
     }
 }