From c09c3ed190b21b539209803e21a27121c1b15946 Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Wed, 31 Jul 2019 16:41:15 +0100 Subject: [PATCH] Use language as node description No point using body as that is already visible. Change-Id: I3425ae4712ccc820ba736ee605524abbc35aecc4 --- .../ve-syntaxhighlight/ve.ce.MWBlockSyntaxHighlightNode.js | 4 ++++ .../ve-syntaxhighlight/ve.ce.MWInlineSyntaxHighlightNode.js | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/modules/ve-syntaxhighlight/ve.ce.MWBlockSyntaxHighlightNode.js b/modules/ve-syntaxhighlight/ve.ce.MWBlockSyntaxHighlightNode.js index 622b967c..43bb47f3 100644 --- a/modules/ve-syntaxhighlight/ve.ce.MWBlockSyntaxHighlightNode.js +++ b/modules/ve-syntaxhighlight/ve.ce.MWBlockSyntaxHighlightNode.js @@ -28,6 +28,10 @@ ve.ce.MWBlockSyntaxHighlightNode.static.name = 'mwBlockSyntaxHighlight'; ve.ce.MWBlockSyntaxHighlightNode.static.primaryCommandName = 'syntaxhighlightDialog'; +ve.ce.MWBlockSyntaxHighlightNode.static.getDescription = function ( model ) { + return ve.getProp( model.getAttribute( 'mw' ), 'attrs', 'lang' ); +}; + /* Registration */ ve.ce.nodeFactory.register( ve.ce.MWBlockSyntaxHighlightNode ); diff --git a/modules/ve-syntaxhighlight/ve.ce.MWInlineSyntaxHighlightNode.js b/modules/ve-syntaxhighlight/ve.ce.MWInlineSyntaxHighlightNode.js index c0a77ee1..c2113296 100644 --- a/modules/ve-syntaxhighlight/ve.ce.MWInlineSyntaxHighlightNode.js +++ b/modules/ve-syntaxhighlight/ve.ce.MWInlineSyntaxHighlightNode.js @@ -29,6 +29,10 @@ ve.ce.MWInlineSyntaxHighlightNode.static.name = 'mwInlineSyntaxHighlight'; ve.ce.MWInlineSyntaxHighlightNode.static.primaryCommandName = 'syntaxhighlightInspector'; +ve.ce.MWInlineSyntaxHighlightNode.static.getDescription = function ( model ) { + return ve.getProp( model.getAttribute( 'mw' ), 'attrs', 'lang' ); +}; + /* Registration */ ve.ce.nodeFactory.register( ve.ce.MWInlineSyntaxHighlightNode );