vermiculus / sx.el

Stack Exchange for Emacs
http://stackapps.com/q/3950
709 stars 40 forks source link

Wrong code display #322

Open evgeny-panasyuk opened 7 years ago

evgeny-panasyuk commented 7 years ago

Wrong display of code on pages like this.

Code is:

#include <boost/multi_index_container.hpp>
#include <boost/multi_index/ordered_index.hpp>
namespace bmi = boost::multi_index; 
...

But sx.el displays it as:

#include <boost/multi_index_container.hpp>
#include 
namespace bmi = boost::multi_index;

Also the same issue present within temp buffer (when click on code).

I saw similar problem (with missing include) on several other C++ questions.

vermiculus commented 7 years ago

It looks like the tag-bot-info tag's implementation works just fine.

The problem in master is sx-question-print.el:575 call to markdown-code-at-point-p.

@jrblevin, does markdown-code-at-point-p really only work with inline code blocks? Could we / should we use markdown-code-block-at-point instead?

@Malabarba do you foresee any issues with doing this? It's just a boolean check, so I think we'll be ok.

jrblevin commented 7 years ago

Sorry for the long delay in responding. I changed the function name to markdown-inline-code-at-point-p for clarity and marked the old one as obsolete. Indeed, it only checks for inline code at the point (because it's useful to separate the block and inline parsing steps).

dvzubarev commented 6 years ago

I can still reproduce a problem. sx - 0.3, sx-20170521.1832 markdown-mode - 2.4-dev, markdown-mode-20170925.912