jenkins-bot has submitted this change and it was merged.

Change subject: Combine identical references in one
......................................................................


Combine identical references in one

Change-Id: Ib2460ec77774c98c903910d416209669c572b765
---
M includes/Lua/mw/ext/articlePlaceholder/referenceRenderer.lua
1 file changed, 8 insertions(+), 2 deletions(-)

Approvals:
  Thiemo Mättig (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/Lua/mw/ext/articlePlaceholder/referenceRenderer.lua 
b/includes/Lua/mw/ext/articlePlaceholder/referenceRenderer.lua
index a301c40..fcc44ac 100644
--- a/includes/Lua/mw/ext/articlePlaceholder/referenceRenderer.lua
+++ b/includes/Lua/mw/ext/articlePlaceholder/referenceRenderer.lua
@@ -48,8 +48,14 @@
     self._entityrenderer.setHasReferences( true )
 
     while i do
-      referenceWikitext = snaksRenderer( reference['snaks'] )
-      table.insert( referencesWikitext, frame:extensionTag( 'ref', 
referenceWikitext ) )
+      local referenceWikitext = snaksRenderer( reference['snaks'] )
+      -- Prefix reference name with r as the hash might be numeric
+      local referenceTagName = 'r' .. mw.hash.hashValue( 'crc32', 
referenceWikitext )
+      table.insert(
+        referencesWikitext,
+        frame:extensionTag( 'ref', referenceWikitext, { name = 
referenceTagName } )
+      )
+
       i, reference = next( references, i )
     end
   end

-- 
To view, visit https://gerrit.wikimedia.org/r/296177
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib2460ec77774c98c903910d416209669c572b765
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ArticlePlaceholder
Gerrit-Branch: master
Gerrit-Owner: Putnik <m...@putnik.ws>
Gerrit-Reviewer: Hoo man <h...@online.de>
Gerrit-Reviewer: Jackmcbarn <jackmcb...@gmail.com>
Gerrit-Reviewer: Lucie Kaffee <lucie.kaf...@wikimedia.de>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to