 			{
 				contentName: "source.embedded.erlang"
 				patterns: [include: "source.erlang"]
-				begin: "^([ \\t]*)(\\.\\.)\\s+(code(?:-block)?)(::)\\s+(erlang)\\s*$"
+				begin: "^([ \\t]*)(\\.\\.)\\s+(code(?:-block)?)(::)\\s+(erlang)(?=\\s*$)"
 				end:   "^(?!\\s*$|\\1[ \\t]+\\S)"
 				beginCaptures:
 					2: name: "punctuation.definition.directive.restructuredtext"

			{
				contentName: "source.embedded.css"
				patterns: [include: "source.css"]
				begin: "^([ \\t]*)(\\.\\.)\\s+(code(?:-block)?)(::)\\s+(css)\\s*$"
				end:   "^(?!\\s*$|\\1[ \\t]+\\S)"
				beginCaptures:
					2: name: "punctuation.definition.directive.restructuredtext"

			{
				contentName: "source.embedded.js"
				patterns: [include: "source.js"]
				begin: "^([ \\t]*)(\\.\\.)\\s+(code(?:-block)?)(::)\\s+(js|javascript)(?=\\s*$)"
				end:   "^(?!\\s*$|\\1[ \\t]+\\S)"
				beginCaptures:
					2: name: "punctuation.definition.directive.restructuredtext"
