• Welcome to the Kancolle Wiki!
  • If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord

Changes

Jump to navigation Jump to search
Fix anchor id and fragment link creation when api_id is not available.
Line 65: Line 65:  
_question_marks = "??",
 
_question_marks = "??",
 
_fragment_prefix = "shipremodellistkai",
 
_fragment_prefix = "shipremodellistkai",
 +
_fragment_joiner = "_",
 
}
 
}
   Line 76: Line 77:     
function ShipRemodelListKai:name(ship)
 
function ShipRemodelListKai:name(ship)
return {values = {value = Formatting:id_span(tostring(ship:api_id() or mw.ustring.lower(mw.ustring.gsub(ship:name(), "%s+"))), self._fragment_prefix, Formatting:format_link(ship:link()))}, bg_color = self._transparent, text_align = self._center_align}
+
return {values = {value = Formatting:id_span(tostring(ship:api_id() or mw.ustring.lower(mw.ustring.gsub(ship:name(), "%s+", self._fragment_joiner))), self._fragment_prefix, Formatting:format_link(ship:link()))}, bg_color = self._transparent, text_align = self._center_align}
 
end
 
end
   Line 149: Line 150:  
local name_after = self._remodel_to == nil and self._question_marks or self._dash
 
local name_after = self._remodel_to == nil and self._question_marks or self._dash
 
if self._remodel_to then
 
if self._remodel_to then
name_after = Formatting:fragment_link(tostring(self._remodel_to:api_id() or mw.ustring.lower(mw.ustring.gsub(self._remodel_to:name(), "%s+"))), self._fragment_prefix, self._remodel_to:name())
+
name_after = Formatting:fragment_link(tostring(self._remodel_to:api_id() or mw.ustring.lower(mw.ustring.gsub(self._remodel_to:name(), "%s+", self._fragment_joiner))), self._fragment_prefix, self._remodel_to:name())
 
end
 
end
 
return {values = {value = name_after}, bg_color = self._transparent, text_align = self._center_align}
 
return {values = {value = name_after}, bg_color = self._transparent, text_align = self._center_align}
Anonymous user

Navigation menu