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

QTextEdit: multi-line monospace text is not written to proper markdown

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.15.7, 6.2.2, 6.3.0 Feature Freeze, 6.4.0 Beta2
    • GUI: Text handling
    • None

    Description

      1. open up qtbase/examples/widgets/richtext/textedit
      2. clear the text and reset the style (that's another bug: why does it think the first thing you type will be an H1, just because it was there from before? deletion is incomplete)
      3. type a little plain text; hit enter
      4. paste in some multi-line output from Konsole
      5. save it to Markdown

      The output will be plain text, blank line, backtick, multi-line text, and closing backtick. This is not valid: md2html demonstrates that the text between the backticks will be parsed as markdown, and the backticks are taken as literals. Likewise if you try to read back the markdown that you wrote, same result.

      It seems that whenever the backtick span can't be closed on the same line, we need to switch to using fences, as if it was a <pre> or <code> block in HTML.

      I've also seen cases when code blocks get converted to a series of lines with backticks around them, but forgot how to reproduce it ATM; or maybe it was fixed already.

      Attachments

        Issue Links

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

          Activity

            People

              srutledg Shawn Rutledge
              srutledg Shawn Rutledge
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes