-12

This question already has an answer here:

In many cases, we have to make a special attention to specific part of code, and Arrows are great way for that. Is it possible, that CharMap (or at least several SpecialSymbols were added into post EDITOR (for Superuser, Stackoverflow and several other coding SO sites)? so, we can quickly insert those symbols/arrows into answer.

enter image description here

(Btw, or there could be a way to mark the part of code which should cause more attention to it... i.e. making the color of the word RED and BOLDED)

p.s. why you thought that i am including them in questions? I said while Answering to questions, it is usable for. So, it's not me who uses these chars, but any of answer-er.

marked as duplicate by random feature-request Sep 4 '17 at 20:42

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 7
    This may have a benefit in rare cases. But generally speaking, if you often find yourself needing to highlight a specific piece of code just to make your point clear, then you probably are including too much code in your questions that is unrelated to the problem at hand. You should to go back and remove as much of the unrelated code as necessary to make your MCVE as minimal as possible. – psubsee2003 Sep 1 '17 at 11:33
  • 1
    I don't see how this is a duplicate in any way. How could a search for this question possibly get you the other question? And the supposedly "duplicated" question doesn't address arrows at all, which is the main thrust of this question! – Scott Biggs Nov 7 '18 at 18:12
  • @ScottBiggs yes, the Downvote brigade doesn't tolerate things here. You ask question and get -XY downvotes. – T.Todua Nov 7 '18 at 18:19
3

Markdown can already add emphasis to formatted code blocks. It's not obvious or entirely trivial, but the basic method involves putting the code block (without the usual extra leading indent, and with all < and > properly HTML-entity-encoded) inside nested <pre>+<code> tags, then using HTML emphasis, usually both <b> and <i> together. It looks something like this:

You should change the values (see emphasis)

<script
jQuery('.mySender123 input[type="submit"]').foo();

As you can see, this allows syntax highlighting to work as well. The Markdown source for that looks like this:

<pre><code>&lt;script
jQuery('<b><i>.mySender123</i></b> input[type="submit"]').foo();</code></pre>

I would also recommend that you follow Tensibai's advice to make your descriptions more, well, descriptive. Formatting is a convenient shortcut, but it's not a perfect substitute for simple instruction. Adding extra UI features for a rarely-used and dubiously-helpful technique is not a good strategy in general. Everything in the UI needs to pull its own weight and be very common.

Finally, there are tools you can use to make inserting arrows easier for yourself. Consider ClipX + its Stickies plugin to allow simple Ctrl + Shift + V, A pasting of an arrow character, or modify any of several userscripts that adds toolbar buttons to insert an arrow at the cursor instead of whatever the script originally did.

  • Finally, a counterbalanced person! Excellent and reasonable answer, without inadequate reactions. What a rare occasion on meta-se. Now, I agree with you! I forgot I have QuickTextPaste, excellent app. – T.Todua Sep 4 '17 at 7:12
3

Your example is a bad answer example. You should not say

You should change the values(see arrows)

but

You shoud review the value you're passing as first argument to jQuery, .mySender123 is wrong here because ...".

No need for arrows or emphasis in the code, you write a better answer as you name the value and give some back up on why this should be changed.

If the code block is large and you have multiple points of attention to raise, put it as a whole for overall explanation and then copy the chunks needing more details and explain them one by one.

  • I dont agree with you. answers should be as compact as possible, and putting prolonged sentences for extra explanation is quite odd. programmers dont need those extra sentences and etc, they prefer to read the real examples i think. that's why emphasis is quite better. – T.Todua Sep 2 '17 at 19:06
  • Let agree to disagree then, what you're describing could be a good fit for a documentation project, not for a knowledge base where the goal is to teach and not just give the code, giving a raw code with minimal explanation is a job of contractor and not what Stack Exchange is about – Tensibai Sep 2 '17 at 21:20
  • A picture (or an arrow) is worth a thousand words! – Scott Biggs Nov 7 '18 at 18:14

Not the answer you're looking for? Browse other questions tagged .