|
In the message I just posted below, I had the following PRE block:
<pre lang="text"><% %></pre>
It seems the ASP.Net code block got highlighted like ASP.Net (i.e., the text is highlighted bright yellow). This is unexpected, because I set the lang to "text", not to a specific language, like "html". When I set the lang to "text", I would think there would be no special highlighting. This is how it gets rendered:
<% %>
|
|
|
|
|
AFAICT it has always done that, everywhere inside PRE tags, and no matter what language you do or don't specify.
|
|
|
|
|
Excellent, so it's a more common bug than I had known. Perhaps it'll be bumped up into the top 500 list of issues for CP to address.
|
|
|
|
|
This is because the coloriser sniffs the text to see if the person posting the code forgot (or was unaware of the need) to put in the lang attribute.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
Hmmm, but my PRE block did have the lang set (to "text").
|
|
|
|
|
The system thought you were drunk and ignored you.
Some background: our old, old colouriser used to only be able to handle a single language within a code block (as most colourisers today do). If you had an ASP or ASPX page with inline code then you had a mix of markup and code. A user would need to specify, say, VBSsript as the language in an ASP page to make the inline VBScript look good, or they could choose ASP as the language to make the markup look good.
We then moved to our current colouriser that colourises each block in code according to what it actually is. ASP starts of as markup, the changes to VBScript colourising in the code, then to markup, then to javascript etc.
In order to get this working consistently we needed to override what users were specifying. Someone would create a file that had a single <% at the start and then was all C#, but we knew it was actually markup first, then C#, so we overrode their choice to make the colourisation as correct as possible.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
Soooooo... known bug?
|
|
|
|
|
I have no idea what you mean by that sentence. The issue is the 2-character sequences <% and %> always get highlighted inside PRE blocks, whatever language is or isn't specified.
Like so (no lang, lang="C#", lang="text", lang="asp"):
<% blah %>
<% blah %>
<% blah %>
<% blah %>
|
|
|
|
|
I just tried to use the following text in my most recent tip/trick as part of the abstract:
<% %>
When I posted the tip/trick, that whole block of text was removed (or maybe wasn't displaying because it was never HTML encoded and the browser didn't know how to handle the characters). I then edited it to HTML encode the characters:
<% %>
That didn't work either. That entire block of text was missing. Is this by design? Shouldn't I be able to enter HTML characters somehow into the abstract for a tip/trick?
|
|
|
|
|
|
It looks fine now because I modified it to remove the HTML characters from the abstract. And I don't see anything that allows me to view the history of changes to my tip/trick... think I'll suggest that as well.
|
|
|
|
|
Oh, and viewing the history of changes may not have even worked. When I went to edit my tip/trick, the HTML characters had actually be removed from the abstract entirely.
|
|
|
|
|
Added to bug list.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
I'm wondering if the Q&A would benefit from a "Vote to Remove Answer" button on answers that would only be available to members of a specified level, so that if 3 or so of these members agree that an answer is completely innappropriate there would be a way to remove them completely as opposed to just 1-voting those answers. (ie. Experienced, active members in the Q&A)
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
People with the appropriate reputation level can already delete answers, and answers get deleted regularly.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Since I didn't know that, I suppose I can assume that I'm not worthy... (yet)
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
Do you not see a red X? That is the 'delete' widget. A red flag is the 'report' widget.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I do, but only my own answers. I only see the flag on others' answers.
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
Yes Kramer, For Delete QuickAnswers : Member should be Platinum Author, Authority, Editor or Organiser.
More info Member Reputation System[^]
My OT suggestion : QA section needs another editor like DD
thatraja |Chennai|India|
Brainbench certifications Down-votes are like kid's kisses don't reject it Do what you want quickly because the Doomsday on 2012
|
|
|
|
|
I'm glad the system is in place. I'm just wondering if anyone would consider removing duplicate answers that are blatantly added after the first. It seems that many members are simply doing this to either garner rep-points or because they are simply too lazy to read the answers that are already there first. Either way, I think the integrity of the Q&A's would go up if this were to be done. (I know it's easy to make the suggestion and that implementation is a whole different ball of wax)
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
I reported a plagiarized article just a minute ago, but it immediately disappeared from the approval list. Backtracking to the URL showed it as approved, with all the comments removed (including mine), but now it is back[^]. Am I hallucinating?
|
|
|
|
|
One you report an article it disappears from the approval list. Good catch by the way!
Thanks,
Sean Ewington
The Code Project
|
|
|
|
|
I would prefer to think he was halucinating, it's more fun
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC League Table Link
CCC Link[ ^]
|
|
|
|
|
uʍop ǝpısdn uɹnʇ buıɥʇʎɹǝʌǝ sǝʞɐɯ ˙˙˙pıɔɐ ʇsǝʇɐן ǝɥʇ ɟo pןoɥ uǝʇʇob ʇsnظ ǝʌ,ı 'ןןɐ ɹǝʇɟɐ 'ǝןqıssod sɐʍ ʇı ןןǝʍ
|
|
|
|
|
I see! That explains it. I still haven't got the hang of this...
BTW, I figured out why the comments disappeared - I was looking at an older revision.
|
|
|
|