Edit or Create a page
Select the Insert button
Select the View more button
Find Custom Code Highlight for Confluence and click it
Paste of type in the code you want to display
Add a <highlight> tag before the start of code you want highlighted and a </highlight> closing tag at the end of any code you want highlighted
Press Insert
Your highlighted code will appear as below:
var reregisterWatcher = function () { self.watcher && self.watcher.close(); // clean up existing watcher if present self.watcher = fs.watch(DESCRIPTOR_FILENAME, {persistent: false}, function (event) { if (event === 'change' || <highlight>event === 'rename') { self.logger.info('Re-registering due to ' + DESCRIPTOR_FILENAME + ' change');</highlight> self.reloadDescriptor(); self.register(true); if(self.config.validateDescriptor()) { <highlight>self.validateDescriptor();</highlight> } } // re-register after each change, intellij's "safe write" feature can break file watches reregisterWatcher(); }); }; |