Fix documentation lookup#460
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #460 +/- ##
=======================================
Coverage 80.28% 80.28%
=======================================
Files 21 21
Lines 847 847
Branches 78 78
=======================================
Hits 680 680
Misses 167 167
🚀 New features to boost your workflow:
|
|
clang-tidy review says "All clean, LGTM! 👍" |
JohanMabille
left a comment
There was a problem hiding this comment.
Thanks for the fix! Can you add a test after this one to check that the interpreter correctly finds the documentation for move (utility) for instance?
Also what does happen if someone wrongy types ?std::vector push_back ?
@JohanMabille thanks for the review. I'll look into writing a test tomorrow, and ping you when its ready. I'm not sure what is wanted if someone executes |
…) and move (algorithm)
|
Added 2 tests I feel someone executing |
|
clang-tidy review says "All clean, LGTM! 👍" |
Since this PR allows to parse what comes after a space, I was wondering if we would get an error, or if there was an additional matching pattern for finding the tag. |
|
Ok let's get this one in! |
Closes #456
The reason you couldn't look up some of these pieces of documentation in cppreference was due to 2 issues. One is that you need to look up something according to its name in the tag file (e.g. you search for
sortand notstd::sort). This requires no changes to xeus-cpp. The other issue with documentation lookup, is that it only currently looks for something equal to whatever was after the?and ignores anything after a space occurs. e.g.?move,?move (utility)and?move (algorithm)will look up the same thing in the cppreference tagfile (i.emove). Once I knew the second bug, I worked with chatgpt, and found the following one line diff to fix the documentation issue. Images below are just to show it working.