atom-asciidoc-preview icon indicating copy to clipboard operation
atom-asciidoc-preview copied to clipboard

Atom live preview syntax highlighting doesn't work after update to 2.12.3

Open Foadsf opened this issue 5 years ago • 10 comments

Description

follow up on this comment, Atom's live preview syntax highlighting used to work properly:

q1i1ovDb6w

But now after update it doesn't:

atom_2019-03-18_12-01-09

  • Atom version: 1.35.1 x64
  • OS: Windows 10
  • asciidoc-preview version: 2.12.3
  • language-asciidoc version: 1.5.8

Screenshots

Your screenshot.

Syntax example

[source,scilab]
....
function y = fibonacci(N)
    select N
    case 0 then
        y = 0;
    case 1 then
        y = 1;
    else
        y0 = 0;
        y1 = 1;
        y = 1;
        for ii = 3:N do
            y0 = y1;
            y1 = y
            y = y1 + y0;
        end
    end
endfunction
....

Foadsf avatar Mar 18 '19 11:03 Foadsf

Are you speaking about syntax highlighting inside the preview or inside the asciidoc document?

ldez avatar Mar 18 '19 11:03 ldez

@ldez inside the live preview

Foadsf avatar Mar 18 '19 11:03 Foadsf

That's weird, did you enable syntax highlighting ? You might need to add :source-highlighter: highlight.js.

ggrossetie avatar Mar 18 '19 11:03 ggrossetie

2.12.3 is using Asciidoctor.js 1.5.9 ?

ggrossetie avatar Mar 18 '19 11:03 ggrossetie

@Mogztter yes it is right on top of my code:

atom_2019-03-18_12-58-28

two days ago it was working even without this line as I reported.

2.12.3 is using Asciidoctor.js 1.5.9 ?

This I didn't know how to find. Would you be kind to instruct me how the Asciidoctor.js version should be found?

P.S. FireFox addon doesn't need this line either.

Foadsf avatar Mar 18 '19 12:03 Foadsf

@Foadsf you can use the built-in attribute asciidoctor-version. In your document add {asciidoctor-version} it will print the version.

ggrossetie avatar Mar 18 '19 12:03 ggrossetie

@Mogztter thanks a lot {asciidoctor-version} --> 1.5.8

Foadsf avatar Mar 18 '19 12:03 Foadsf

Syntax highlighting is working for "common" languages:

ok

Not sure how the Scilab language was highlighted before... Scilab is not even in this list: https://github.com/asciidoctor/atom-asciidoc-preview/blob/8d4a41d1e14d8f7fffa507a3cf6973923248f942/lib/highlights-helper.coffee#L1

@ldez Any idea ?

ggrossetie avatar Mar 18 '19 12:03 ggrossetie

@Mogztter now this is strange :) I'm happy I have screenshots otherwise I would doubt my sanity :))

Foadsf avatar Mar 18 '19 12:03 Foadsf

I get the same result with 2.12.2:

2122

ggrossetie avatar Mar 18 '19 12:03 ggrossetie