Article formatting screwed up (sine a long time?)
-
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
-
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
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
-
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
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)
-
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
Found and fixed and will deploy once I've finished testing
cheers Chris Maunder
-
Found and fixed and will deploy once I've finished testing
cheers Chris Maunder
Thanks! Looking forward! Cheers Andi
-
Found and fixed and will deploy once I've finished testing
cheers Chris Maunder
-
Found and fixed and will deploy once I've finished testing
cheers Chris Maunder
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 attributescountlines
andcountstart
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 -
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 attributescountlines
andcountstart
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 AndiLooks 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