diff --git a/src/languages/yaml.js b/src/languages/yaml.js
index 51f8f73544..d0d0603cbc 100644
--- a/src/languages/yaml.js
+++ b/src/languages/yaml.js
@@ -46,15 +46,12 @@ export default function(hljs) {
const SINGLE_QUOTE_STRING = {
className: 'string',
relevance: 0,
- variants: [
- {
- begin: /'/,
- end: /'/
- }
- ],
+ begin: /'/,
+ end: /'/,
contains: [
{
- begin: /''/,
+ match: /''/,
+ scope: 'char.escape',
relevance: 0
}
]
diff --git a/test/markup/yaml/string.expect.txt b/test/markup/yaml/string.expect.txt
index 875ff7161d..ede844b1e7 100644
--- a/test/markup/yaml/string.expect.txt
+++ b/test/markup/yaml/string.expect.txt
@@ -10,4 +10,6 @@
key: "\\"
key: "\"
key: value"
-key: value
\ No newline at end of file
+key: value
+key: ''''
+key: 'some''value'
\ No newline at end of file
diff --git a/test/markup/yaml/string.txt b/test/markup/yaml/string.txt
index 10c2354cf8..64590ea6e9 100644
--- a/test/markup/yaml/string.txt
+++ b/test/markup/yaml/string.txt
@@ -11,4 +11,5 @@ key: "\\"
key: "\"
key: value"
key: value
-
+key: ''''
+key: 'some''value'