sublime-jsdocs icon indicating copy to clipboard operation
sublime-jsdocs copied to clipboard

How to prevent Comment Reformatting (Alt-Q) from flattening code samples?

Open cyborgx37 opened this issue 9 years ago • 1 comments

If I have a comment block like so:

/**
 * Use this function like so:
 *
 * <code>
 *     foo({ baz: "bat" }).then(function(){});
 * </code>
 *
 * @param {object=} options - Options.
 */
function foo( options ){}

Then reformat using alt-Q, my example code is flattened:

/**
 * Use this function like so:
 *
 * <code> foo({ baz: "bat" }).then(function(){}); </code>
 * @param {object=} options - Options.
 */

I haven't figured out how to format my example code so that the reformatter will skip it. Is that possible?

cyborgx37 avatar Sep 25 '16 03:09 cyborgx37

Not as far as i'm aware, sorry. Best I could offer is to cut the block you don't want formatted, format then paste it back. Not the best, but it'll hopefully help.

spadgos avatar Sep 29 '16 11:09 spadgos