Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Behind the Scenes
  3. Qt.io webservices
  4. Bug in code display
Forum Updated to NodeBB v4.3 + New Features

Bug in code display

Scheduled Pinned Locked Moved Solved Qt.io webservices
4 Posts 3 Posters 1.0k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • VRoninV Offline
    VRoninV Offline
    VRonin
    wrote on last edited by VRonin
    #1

    Hi everyone, I think there is a bug in how code is rendered in the main forum when using escape chars.

    This is what I typed:
    source of message

    The preview renders correctly
    preview is correct

    But the slashes before the square brackets disappear in the final rendering
    final rendering

    single line:

    QRegularExpression("\[(.+)\]");

    block quote

    QRegularExpression("\[(.+)\]");
    

    Can you confirm the bug?

    My setup: Win7, Firefox 64.0

    "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
    ~Napoleon Bonaparte

    On a crusade to banish setIndexWidget() from the holy land of Qt

    kshegunovK 1 Reply Last reply
    0
    • VRoninV VRonin

      Hi everyone, I think there is a bug in how code is rendered in the main forum when using escape chars.

      This is what I typed:
      source of message

      The preview renders correctly
      preview is correct

      But the slashes before the square brackets disappear in the final rendering
      final rendering

      single line:

      QRegularExpression("\[(.+)\]");

      block quote

      QRegularExpression("\[(.+)\]");
      

      Can you confirm the bug?

      My setup: Win7, Firefox 64.0

      kshegunovK Offline
      kshegunovK Offline
      kshegunov
      Moderators
      wrote on last edited by kshegunov
      #2

      Confirmed. Escaping is rather iffy to say the least. Use C-slashes to escape the backslash if needed as a workaround.
      E.g:
      `\\\[Text\\\]` produces \\[Text\\]

      Read and abide by the Qt Code of Conduct

      1 Reply Last reply
      1
      • VRoninV Offline
        VRoninV Offline
        VRonin
        wrote on last edited by
        #3

        ping @ollipuu as I think this was introduced by the recent update.

        "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
        ~Napoleon Bonaparte

        On a crusade to banish setIndexWidget() from the holy land of Qt

        1 Reply Last reply
        0
        • ollipuuO Offline
          ollipuuO Offline
          ollipuu
          wrote on last edited by
          #4

          Hmm... I think this is how it's been since beginning as we haven't made any changes to Markdown parsing. NodeBB uses package nodebb-plugin-markdown which uses very popular package markdown-it, which renders the provided example similarly: QRegularExpression example

          So for now the workaround is to escape the backslashes, like @kshegunov suggested.

          1 Reply Last reply
          1

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved