21

Okay, so we've got Interface options for specifying language prettify implemented now, which is fantastic!

There's a little bitty problem, though: As it stands, this doesn't work right in previews.

For example, the preview for the text:

<!-- language: lang-css -->

     div#ads {
         display: none
     }

renders as if it were

<!-- language: lang-sh -->

     div#ads {
         display: none
     }

That is, instead of

 div#ads {
     display: none
 }

it renders as

 div#ads {
     display: none
 }

It would be really nice if this would be fixed, so we could make sure we were doing things right before hitting "post". (I'm also not sure if the tag-based defaults are honored in the preview, which would also be quite helpful for reasons which should be obvious.)

6
  • I think the wording of this request should be generalized for any language hints. The problem is that it doesn't apply the hints in the editor preview, what is applied is determined by the language detector (as if it were lang-default). Is this what you guys are planning on doing @balpha? Applying the hints in the editor preview? Commented May 19, 2011 at 21:44
  • 1
    @Jeff Yes -- that's what the request is about. CSS is just an example.
    – balpha StaffMod
    Commented May 20, 2011 at 6:26
  • 1
    Most of this is done (will probably be deployed soon); only inferring the default highlighting when you change the question's tags isn't done yet.
    – balpha StaffMod
    Commented May 23, 2011 at 18:57
  • @balpha: I was under the impression preview didn't work and was frankly shocked today when it did! Commented May 23, 2011 at 22:01
  • 1
    I did find one "bug" though. In preview, it looks correct if there is no blank line between the language hint line and the first line of code. But after hitting submit all the code is not code. To fix the blank line must be inserted. Commented May 23, 2011 at 22:04
  • @Rick: oh, yeah, I saw that even before this was implemented... maybe they ought to have written the Markdown renderer in Wasabi (so that the same code could be used for client and server) ;-P
    – SamB
    Commented May 24, 2011 at 18:13

1 Answer 1

9

Most of this has been done for a while now; the only thing missing was inferring the highlighting language when you're writing/editing a question and editing its tags.

This final part will be working after the next build.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .