• Hello! Thanks for your great plugin! You are doing a great job!

    Could you help me?

    Problem with the division symbol “/”, does not identifies it correctly and all the next code is not identifies correctly.

    It’s “/” a standard operator in JS.

    I used

    <pre><code class="js">// Expire this auction one day from now.
    // Note that we convert from the JavaScript timestamp (milliseconds):
    
    const expirationTime = Math.round(Date.now() / 1000 + 60 * 60 * 24);
    
    the next code is broken after this sentence
    </code></pre>

    Example
    Example with html code

    Any help would be greatly appreciated. Please advise.
    Thank you!

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter mrdexters1

    (@mrdexters1)

    Hello, any help?

    Plugin Author Andi Dittrich

    (@andi-dittrich)

    Hi @mrdexters1 ,

    sry i didn’t got any notifications regarding this issue.

    thanks for your report, i’ve to take a look into the rulesets, the issue is caused by the second slash within the comment section – it’s highlighted as “regex” in between

    Thread Starter mrdexters1

    (@mrdexters1)

    Hello @andi-dittrich, no problem. Thank you for the quick response today.

    Yes, it happened because I use the slash, but this is the division operator in JS.

    Tried removing spaces between slashes, but nothing changed

    const expirationTime = Math.round(Date.now() / 1000 + 60 * 60 * 24);

    I will be very grateful for your help. Thank you!

    Plugin Author Andi Dittrich

    (@andi-dittrich)

    it’s not an issue with the division operator directly – it’s an error within the regex of the EnlighterJS language support file which currently “identifies” a false regular expression between the first slash (division operator) and the second slash (first slash of the single line comment).

    Thread Starter mrdexters1

    (@mrdexters1)

    @andi-dittrich Understood, but what then to do in this case? Can this be fixed? Thank you.

    Plugin Author Andi Dittrich

    (@andi-dittrich)

    it will be fixed soon but it may take some time..
    as a “fast” workaround you can build your own EnlighterJS version and remove the regex rule which highlights regular expressions

    Thread Starter mrdexters1

    (@mrdexters1)

    yes, yes, I understand about the time, no problem.

    I think a simple solution would be to just move the comment line above, to the other.

    sorry, didn’t quite understand about “you can build your own EnlighterJS”

    Plugin Author Andi Dittrich

    (@andi-dittrich)

    a hotfix is available within the EnlighterJS master branch: https://github.com/EnlighterJS/EnlighterJS/tree/master/dist

    just replace the enlighterjs.min.js file within the plugin and click on “save changes” on the settings page to purge the cache

    Thread Starter mrdexters1

    (@mrdexters1)

    @andi-dittrich Wow, thanks a lot! it was quick.
    Appreciate your help!

    I will update, test and write, thank you!

    Thread Starter mrdexters1

    (@mrdexters1)

    Hello @andi-dittrich looks great! Thank you so much for your help!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Problem with the division symbol “/”’ is closed to new replies.