function appendBanner(hp)
    bannerTopic = hp.objectSystemName;
    if isempty(bannerTopic)
         bannerTopic = hp.topic;
         if hp.helpOnInstance
             % Not an object; use the InstanceIsA message instead
             hp.helpStr = '';
         end
    end
    if isempty(hp.helpStr)
        % since there is no help, just say what the input resolved to
        if hp.helpOnInstance
            hp.helpStr = helpUtils.getInstanceIsa(hp.inputTopic, bannerTopic);
            hp.needsHotlinking = false;
            hp.fullTopic = '';
        else
            hp.topic = hp.inputTopic;
            hp.objectSystemName = hp.inputTopic;
        end
    else
        wantStrong = hp.wantHyperlinks && hp.commandIsHelp;
        bannerTopic = makeStrong(bannerTopic, wantStrong);
        if hp.isTypo
            inputTopic = makeStrong(hp.inputTopic, wantStrong);
            helpForTopic = getString(message('MATLAB:help:HelpForTypoBanner', inputTopic, bannerTopic));
        else
            helpForTopic = getString(message('MATLAB:help:HelpForBanner', bannerTopic));
        end
        hp.helpStr = sprintf('%s%s', helpForTopic, hp.helpStr);
    end
end

function topic = makeStrong(topic, wantStrong)
    if wantStrong
        topic = ['<strong>', topic, '</strong>'];
    end
end

%   Copyright 2018 The MathWorks, Inc.