Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. Site Bugs / Suggestions
  4. Article formatting screwed up (sine a long time?)

Article formatting screwed up (sine a long time?)

Scheduled Pinned Locked Moved Site Bugs / Suggestions
csharphtmlcsslinqcom
8 Posts 4 Posters 1 Views 1 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.
  • A Offline
    A Offline
    Andreas Gieriet
    wrote on last edited by
    #1

    I was not active on CP for quite some while. Now that I looked into some of my articles/tips, I noticed that some a bit "advanced" formatting got completely screwed up in the last two years or so. E.g. highlighting, line numbering, background/foreground color got corrupt. See Invent your own Dynamic LINQ parser[^] at the end of the first pre-block (span...highlight is verbatim instead of html/css directive). I also have on several places used the foreground/background colors to emulate console output with black background and white text. See the same article above in the pre-block after "The output is:". The feature of line numbering of code snippets also got silently removed. Why? I some times refer in the text to these lines. Basically all my articles/tips are affected since I took benefit of these features those days when they were functional... Any remedy in sight? Thanks Andi

    S C 2 Replies Last reply
    0
    • A Andreas Gieriet

      I was not active on CP for quite some while. Now that I looked into some of my articles/tips, I noticed that some a bit "advanced" formatting got completely screwed up in the last two years or so. E.g. highlighting, line numbering, background/foreground color got corrupt. See Invent your own Dynamic LINQ parser[^] at the end of the first pre-block (span...highlight is verbatim instead of html/css directive). I also have on several places used the foreground/background colors to emulate console output with black background and white text. See the same article above in the pre-block after "The output is:". The feature of line numbering of code snippets also got silently removed. Why? I some times refer in the text to these lines. Basically all my articles/tips are affected since I took benefit of these features those days when they were functional... Any remedy in sight? Thanks Andi

      S Offline
      S Offline
      Sean Ewington
      wrote on last edited by
      #2

      Try as I might, I can't seem to get highlighting back into that pre block. It used to be there though, correct?

      Thanks, Sean Ewington CodeProject

      W 1 Reply Last reply
      0
      • S Sean Ewington

        Try as I might, I can't seem to get highlighting back into that pre block. It used to be there though, correct?

        Thanks, Sean Ewington CodeProject

        W Offline
        W Offline
        Wendelius
        wrote on last edited by
        #3

        Indeed the highlight (yellowish background) seems to cause this. The same defect is seen in version 2+ code blocks where I've tried to highlight the changes compared to previous versions: [Properly executing database operations](https://www.codeproject.com/Articles/1020224/Properly-executing-database-operations)

        1 Reply Last reply
        0
        • A Andreas Gieriet

          I was not active on CP for quite some while. Now that I looked into some of my articles/tips, I noticed that some a bit "advanced" formatting got completely screwed up in the last two years or so. E.g. highlighting, line numbering, background/foreground color got corrupt. See Invent your own Dynamic LINQ parser[^] at the end of the first pre-block (span...highlight is verbatim instead of html/css directive). I also have on several places used the foreground/background colors to emulate console output with black background and white text. See the same article above in the pre-block after "The output is:". The feature of line numbering of code snippets also got silently removed. Why? I some times refer in the text to these lines. Basically all my articles/tips are affected since I took benefit of these features those days when they were functional... Any remedy in sight? Thanks Andi

          C Offline
          C Offline
          Chris Maunder
          wrote on last edited by
          #4

          Found and fixed and will deploy once I've finished testing

          cheers Chris Maunder

          A W 3 Replies Last reply
          0
          • C Chris Maunder

            Found and fixed and will deploy once I've finished testing

            cheers Chris Maunder

            A Offline
            A Offline
            Andreas Gieriet
            wrote on last edited by
            #5

            Thanks! Looking forward! Cheers Andi

            1 Reply Last reply
            0
            • C Chris Maunder

              Found and fixed and will deploy once I've finished testing

              cheers Chris Maunder

              W Offline
              W Offline
              Wendelius
              wrote on last edited by
              #6

              Looks good now!

              1 Reply Last reply
              0
              • C Chris Maunder

                Found and fixed and will deploy once I've finished testing

                cheers Chris Maunder

                A Offline
                A Offline
                Andreas Gieriet
                wrote on last edited by
                #7

                Hello Chris, the highlighting works at places where the article sources did not get screwed up themselves somehow. E.g. see Invent your own Dynamic LINQ parser[^] at the first pre-block. The source view shows that the embedded highlighting in the pre-block got converted over time into plain code... (likewise other highlighting in the same article and others of mine). The other similar issue is about background color. I did use to simulate console output by giving the foreground color white and the background color black in some pre-block. This used to work in the (distant?) past. Now, it looks like it's kind of filtered: the foreground color is still respected, the background got removed completely. You seem to have some stripping/processing/whatever machinery that processes ***existing*** articles once in a while (my interpretation of the situation). E.g. see Escaping in C#: characters, strings, string formats, keywords, identifiers[^], the pre-block after "results in" used to be started like <pre lang="text" style="background:black;color:white;">... but now is truncated to <pre lang="text" style="color: white">. Finally, the pre-block attributes countlines and countstart got stripped off somehow from the sources... E.g. see my History section, V1.2 comment in Invent your own Dynamic LINQ parser[^]. Are these any deprecated features? Regards Andi

                C 1 Reply Last reply
                0
                • A Andreas Gieriet

                  Hello Chris, the highlighting works at places where the article sources did not get screwed up themselves somehow. E.g. see Invent your own Dynamic LINQ parser[^] at the first pre-block. The source view shows that the embedded highlighting in the pre-block got converted over time into plain code... (likewise other highlighting in the same article and others of mine). The other similar issue is about background color. I did use to simulate console output by giving the foreground color white and the background color black in some pre-block. This used to work in the (distant?) past. Now, it looks like it's kind of filtered: the foreground color is still respected, the background got removed completely. You seem to have some stripping/processing/whatever machinery that processes ***existing*** articles once in a while (my interpretation of the situation). E.g. see Escaping in C#: characters, strings, string formats, keywords, identifiers[^], the pre-block after "results in" used to be started like <pre lang="text" style="background:black;color:white;">... but now is truncated to <pre lang="text" style="color: white">. Finally, the pre-block attributes countlines and countstart got stripped off somehow from the sources... E.g. see my History section, V1.2 comment in Invent your own Dynamic LINQ parser[^]. Are these any deprecated features? Regards Andi

                  C Offline
                  C Offline
                  Chris Maunder
                  wrote on last edited by
                  #8

                  Looks like lots of your &span> tags were being HTML encoded. I've fixed these. Background colour should be set using background-color, not background. We don't allow background because it's too difficult to sanitise safely. With regards to countlines: these were being stripped out but I've added them back to the "allow" list. Which blocks do you want to have with line counts?

                  cheers Chris Maunder

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups