sublime-jsdocs
sublime-jsdocs copied to clipboard
How to prevent Comment Reformatting (Alt-Q) from flattening code samples?
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?
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.