Editing a post will replace your code with the css

Started by
3 comments, last by 8Observer8 4 years, 4 months ago

If I make a post and include a code block, and then go back and edit it, it will show me the css for the display of the code. If I hit save, it will now show the css of the code, and I imagine if I hit edit again I'd get the css of the css of the code…

Also how do I pick the language that a code block is going to be? If it's auto-detecting it, I don't think it does it right after I post. I have to hit refresh to see it as C++ code instead of Plain Text.

This is in Chrome on Windows 10.

Advertisement

Latest update addresses this. Thanks for reporting.

You can select the language in the toolbar. Specifically, select the code block and use the code toolbar item dropdown:

It currently defaults to plaintext, which is why highlights won't typically work when the post is saved, but I'm probably going to change it to auto-detect for syntax highlighting.

Admin for GameDev.net.

Awesome!

I am so glad to see TypeScript in the list! Thank you very much!


export class Player
{
    private id: number;
    private name: string;

    public constructor(id: number, name: string)
    {
        this.id = id;
        this.name = name;
    }

    public get Id(): number
    {
        return this.id;
    }

    public get Name(): string
    {
        return this.name;
    }
}

This topic is closed to new replies.

Advertisement