Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-14988 Documentation Tool chain
  3. QTBUG-2171

QDoc: Comments in snippets not processed correctly

XMLWordPrintable

      If a comment is encountered in a snippet file (eg: doc/src/snippets/code/src.corelib.tools.qvector.cpp) an opening <span> tag is created, but the closing tag is not. So the following snippet (from QVector::append):

      //! [7]
      QVector<QString> vector(0);
      vector.append("one");
      vector.append("two");
      vector.append("three");
      // vector: ["one", "two", three"]
      //! [7]

      Becomes:

      <pre> <a href="qvector.html">QVector</a><QString> vector(0);
      vector.append(<span class="char">"one"</span>);
      vector.append(<span class="char">"two"</span>);
      vector.append(<span class="char">"three"</span>);
      <span class="comment">// vector: [<span class="char">"one"</span>, <span class="char">"two"</span>, three<span class="char">"]</span></pre>

      As you can see there is a missing </span> corresponding to the class="comment" tag and this causes weird colours in some browsers like Opera.

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

            jerome.pasion Jerome Pasion
            jabarron Jason Barron
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes