Return HTML for highlightjs JavaScript.

    Adjust url in settings. If no url is returned, we don't want this statement to return any HTML.
    This is intended behavior.

    Default value: ``None``

    This value is configurable, see Settings section

    **Tag name**::

        highlightjs_javascript

    **Parameters**:

        :jquery: Truthy to include jQuery as well as highlightjs

    **usage**::

        {% highlightjs_javascript %}

    **example**::

        {% highlightjs_javascript jquery=1 %}

def highlightjs_javascript(jquery=None):
    """
    Return HTML for highlightjs JavaScript.

    Adjust url in settings. If no url is returned, we don't want this statement to return any HTML.
    This is intended behavior.

    Default value: ``None``

    This value is configurable, see Settings section

    **Tag name**::

        highlightjs_javascript

    **Parameters**:

        :jquery: Truthy to include jQuery as well as highlightjs

    **usage**::

        {% highlightjs_javascript %}

    **example**::

        {% highlightjs_javascript jquery=1 %}
    """

    javascript = ''
    # See if we have to include jQuery
    if jquery is None:
        jquery = get_highlightjs_setting('include_jquery', False)
    if jquery:
        url = highlightjs_jquery_url()
        if url:
            javascript += '<script src="{url}"></script>'.format(url=url)
    url = highlightjs_url()
    if url:
        javascript += '<script src="{url}"></script>'.format(url=url)
    javascript += '<script>hljs.initHighlightingOnLoad();</script>'
    return javascript