Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-106488

qdoc: Allow to set language for code snippets

XMLWordPrintable

    • Icon: User Story User Story
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • None
    • Build tools: qdoc
    • None

      The API for including code in documentation has been organically grown.

      There are different variants for including code in-line, allowing you to also set the language (e.g. \code, \qml, \badcode). This has a direct influence on whether the code is highlighted.

      In addition, there's different ways to include external code snippets : \quotefile, \quotefromfile, \snippet. But there is no way currently to set the language (and therefore the desired highlighting) of the external snippet.

      The exact source of the snippet (inline, full file, part of file) should be orthogonal to the question which language the snippet is in. For external files, the language could be auto-detected by file suffix though.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            docinfrastructure Documentation Infrastructure Team
            kkohne Kai Köhne
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes