asciidoctor / brackets-asciidoc-preview

Live Preview of AsciiDoc for Adobe Brackets
MIT License
50 stars 16 forks source link

Code listing CSS bug in some themes when source type is unrecognized #30

Closed stallio closed 9 years ago

stallio commented 9 years ago

The cerulean and slate themes have a bunch of CSS like this:

.listingblock:hover code.asciidoc:before {
  content: "asciidoc";
}

But if I set my source to a value other than the ones that are listed, like so:

[source,foo,numbered]
.First Foo app
---------------------------------------
begin Foo;
if foo && bar

Then when I hover my mouse over the listing in the preview window, it inserts the name of the language it thinks I'm using in front of the code. In this screenshot it thinks I'm using Ruby:

screenshot 1182

This also happens if I set my source to html though in that case it tells me I'm using XML:

screenshot 1183

nerk commented 9 years ago

I tried this with Cerulean, Slate, and Github themes and your example listing. Works for me. Could you please give more details regarding exact versions of Brackets and this plugin you are using?

stallio commented 9 years ago

Sorry, I truncated the code for the sake of posting it here, but the bug doesn't happen with the abbreviated code. Here's the full code:

[source,foo,numbered]
.First Foo app
---------------------------------------
begin Foo;
if foo && bar                       
   then
     if foobar == true
     output foo
   else
     if foobar == maybe
     output foo
   else
     if foobar == unknowable
       output foo
   else
     output bar
for each Foo
   print 'foo'                      
   next;
end Foo.                            
---------------------------------------

I'm using Brackets Release 1.4 build 1.4.0-16380 (release 273804eb3) asciidoc-preview 1.1.6