Use code block annotations for focus, highlighting, and diffs
Use special comments within code blocks to apply visual styles to specific lines. These annotations follow the pattern [!code <action>] and typically require a single space between the exclamation mark and the action keyword.
[!code focus]: Focuses the specific line.[!code --]: Marks a line as removed (diff red).[!code ++]: Marks a line as added (diff green).[!code error]: Marks a line with an error style.[!code warning]: Marks a line with a warning style.
export default {
data() {
return {
msg: 'Error', // [!code error]
msg: 'Warning', // [!code warning]
msg: 'Removed', // [!code --]
msg1: 'Added' // [!code ++]
}
},
}