• Resolved harrisonqi

    (@harrisonqi)


    Library: prism.js
    Theme: Okaidia

    Here’s some problem with dart language. There’s no highlight for dart?

    You can open this page, the java language worked but dart language not worked..

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Jeff Starr

    (@specialk)

    I don’t see anything related to Prismatic, Dart language, or code on that page.

    If you still need help, please let me know the simplest possible code snippet that does not work with Dart or whatever, so I can test locally and try to resolve any issue.

    Thank you.

    Thread Starter harrisonqi

    (@harrisonqi)

    I’m really really sorry. I just broke my website before. Now you can open this page to see this.

    By the way, I also don’t want to limit the height of the code block, no scroll bar is needed.

    (I do not well in English, sorry)

    Thank you so much.

    Plugin Author Jeff Starr

    (@specialk)

    Hi @harrisonqi, I really want to help but that link does not open (I waited for several minutes, just keeps on spinning). The good news is that I don’t need to see your site to investigate the issue. Just need the smallest possible dart code snippet that causes the bug. So if you can just paste the smallest possible dart snippet that will cause the bug, then I can investigate asap.

    For the height of the code block, that is not something that is set by the plugin, so I am guessing that it is your theme styles that are doing it.

    Thread Starter harrisonqi

    (@harrisonqi)

    Thank you @specialk .

    I guess you can’t open my website because China blocked.

    Here’s the code:

    
    import 'package:flutter/material.dart';
    import 'package:flutter/services.dart';
    
    Future main() async {
      // set preferred orientations (landscape only)
      await SystemChrome.setPreferredOrientations([
        DeviceOrientation.landscapeLeft,
        DeviceOrientation.landscapeRight,
      ]);
    
      // disable all UI overlays (show fullscreen)
      await SystemChrome.setEnabledSystemUIOverlays([]);
    }
    
    // start app
    runApp(
      Directionality(
        textDirection: TextDirection.ltr,
        child: Stack(
          children: [
            // placeholder for game
            Container(
              color: Color(0xff27ae60),
            ),
    
            // joypad overlay
            Container(),
          ],
        ),
      ),
    );
    

    the html:

    
    <div class="code-toolbar"><pre class="wp-block-prismatic-blocks  language-dart"><code class="  language-dart">import 'package:flutter/material.dart';
    import 'package:flutter/services.dart';
    
    Future main() async {
      // set preferred orientations (landscape only)
      await SystemChrome.setPreferredOrientations([
        DeviceOrientation.landscapeLeft,
        DeviceOrientation.landscapeRight,
      ]);
    
      // disable all UI overlays (show fullscreen)
      await SystemChrome.setEnabledSystemUIOverlays([]);
    }
    
    // start app
    runApp(
      Directionality(
        textDirection: TextDirection.ltr,
        child: Stack(
          children: [
            // placeholder for game
            Container(
              color: Color(0xff27ae60),
            ),
    
            // joypad overlay
            Container(),
          ],
        ),
      ),
    );</code></pre><div class="toolbar"><div class="toolbar-item"><span>Dart</span></div></div></div>
    

    I noticed: using dart language will not be separated by “<span>”

    Thank you.

    Thread Starter harrisonqi

    (@harrisonqi)

    By the way, if I use Highlight.js everything works fine, but I love
    Prismatic More

    • This reply was modified 4 years, 10 months ago by harrisonqi.
    • This reply was modified 4 years, 10 months ago by harrisonqi.
    Thread Starter harrisonqi

    (@harrisonqi)

    Thank you very much, I think I have found a solution. It is not a problem with your plugin.

    Because I am not a PHP developer, I do n’t know how to solve it. In the past few days, I have to study the source code in order to use your excellent plug-ins.

    Unexpectedly, because your plugin is very good, the theme I used is actually built with PrismJS! And the version is 1.17.1 of the old version, and does not include Dart language support.

    I think I can research and solve this problem by myself!

    Thank you very much for your help.
    I really like your plugin!

    Plugin Author Jeff Starr

    (@specialk)

    Great, glad you got it sorted out.

    I will mark this thread as resolved, feel free to post again with any further infos, etc.

    Cheers

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Dart language not worked’ is closed to new replies.