diff --git a/data/language-specs/sweave.lang b/data/language-specs/sweave.lang
index dc231d0..07211fc 100644
--- a/data/language-specs/sweave.lang
+++ b/data/language-specs/sweave.lang
@@ -45,7 +45,7 @@
 
     <context id="R-block" class="no-spell-check">
       <start>^\s*&lt;&lt;.*&gt;&gt;=</start>
-      <end>@</end>
+      <end>(^|[^[:alnum:]])@([^[:alnum:]]|$)</end>
       <include>
         <context sub-pattern="0" where="start" style-ref="command"/>
         <context sub-pattern="0" where="end" style-ref="command"/>
