sx.el icon indicating copy to clipboard operation
sx.el copied to clipboard

Wrong code display

Open evgeny-panasyuk opened this issue 9 years ago • 3 comments

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.

evgeny-panasyuk avatar Oct 16 '16 15:10 evgeny-panasyuk

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.

vermiculus avatar Oct 16 '16 16:10 vermiculus

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).

jrblevin avatar May 11 '17 02:05 jrblevin

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

dvzubarev avatar Oct 01 '17 12:10 dvzubarev