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

qdoc: Allow to set language for code snippets

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes