# HG changeset patch
# User William Stein <wstein@gmail.com>
# Date 1227810516 28800
# Node ID 8231176e1c4612074fc6b25d91d74ffaa1b9b8ec
# Parent  fdfea4b2a4b708a529c187baf1a5520d373761bd
trac #4057 -- part 2: make it so that underlines are *only* removed in the notebook, not the command line.

diff -r fdfea4b2a4b7 -r 8231176e1c46 sage/interfaces/r.py
--- a/sage/interfaces/r.py	Thu Nov 27 10:23:35 2008 -0800
+++ b/sage/interfaces/r.py	Thu Nov 27 10:28:36 2008 -0800
@@ -671,8 +671,11 @@
         NOTE:
             This is similar to typing r.command?. 
         """
-        s = self.eval('help("%s")'%command)     # ?cmd is only an unsafe shortcut
-        return HelpExpression(s.strip().replace("_\x08",""))
+        s = self.eval('help("%s")'%command).strip()     # ?cmd is only an unsafe shortcut
+        import sage.plot.plot
+        if sage.plot.plot.EMBEDDED_MODE:
+            s = s.replace('_\x08','')
+        return HelpExpression(s)
 
     def _assign_symbol(self):
         """
