-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
help command returns HTML in MEvaluate #29
Comments
It's not just for |
There is an undocumented way to explicitly turn off hyperlinks and other HTML goodies:
This value is queried internally by Note: I did not test the above.. |
Wow, this is very useful information (which support did not give me). It does indeed work, but I need to use
Since we're already wrapping everything |
@amroamroamro Thanks a lot! That's very useful and saves us the trouble of having to strip HTML tags from the output (which is always messy). |
@szhorvat: Try replacing @rsmenon: come to think of it, stripping tags might not be so bad here. I know one should never parse HTML using regexp, but the set of HTML that is outputted is fairly simple of the form:
Should be easy to strip HTML and extract the text. |
Not exactly related to the issue, but you mentioned wrapping evaluated strings in extra code to catch errors. Now I haven't looked at the source code yet, but let me share another less-known trick;
maybe this pattern could be used in your code.. |
@amroamroamro Thanks! This does look very useful indeed. This will all become very relevant when we switch to the MEX interface (instead of the Engine interface). Perhaps we could have a chat sometime about how we're planning to do this. I'd love to listen to your opinion! (freenode or SO chat or something else) |
@szhorvat sure i just joined ##matlab on freenode. you'll find me on the top the list :) |
With work having started on the MEX version, this issue is now more serious. It's most annoying in error messages. Observation: Right now we use However, |
try
%...
catch ME
errmsg = getReport(ME, 'extended', 'hyperlinks','off');
disp(errmsg)
end |
Since changing
MEvaluate
to useevalc
, thehelp
command returns HTML.Example:
This can be reproduced in MATLAB by running it as
matlab -nodesktop
then comparinghelp pi
withevalc('help pi')
The text was updated successfully, but these errors were encountered: