Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSharp highlighting doesn't work #619

Closed
Mohsens22 opened this issue Sep 3, 2018 · 5 comments
Closed

CSharp highlighting doesn't work #619

Mohsens22 opened this issue Sep 3, 2018 · 5 comments

Comments

@Mohsens22
Copy link

Please take a look at
https://github.com/Geeksltd/MSharp.Docs/blob/master/index.html

and see what I've set up.

Then go to this page:
http://learn.msharp.co.uk/#/Tutorials/4/README
And you see that the highlighting doesn't work at all.

@jingsam
Copy link
Contributor

jingsam commented Sep 3, 2018

Try to include <script type="text/javascript" src="components/prism-clike.min.js"></script>.
Also try csharp instead of C#

@Mohsens22
Copy link
Author

No result.

@Mohsens22
Copy link
Author

image

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>MSharp documents</title>
  <link rel="icon" href="_media/favicon.ico">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <meta name="keywords" content="doc,docs,dotnet,core,mvc,Msharp,geeks,geeksltd">
  <meta name="description" content="MSharp documents">
  <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
</head>
<body>
  <div id="app">Loading ...</div>
  <script>
    window.$docsify = {
      notFoundPage: '_media/404.md',
      auto2top: true,
      executeScript: true,
      loadSidebar: true,
      mergeNavbar: true,
      maxLevel: 4,
      subMaxLevel: 2,
      name: 'MSharp docs',
      search: {
        noData: {
          '/': 'No results!'
        },
        paths: 'auto',
        placeholder: {
          '/': 'Search'
        }
      },
      formatUpdated: '{MM}/{DD} {HH}:{mm}',
      plugins: [
        function (hook, vm) {
          hook.beforeEach(function (html) {
            var url = 'https://github.com/geeksltd/MSharp.Docs/blob/master/' + vm.route.file
            var editHtml = '[:memo: Edit Document](' + url + ')\n'
            return editHtml
             + html
             + '\n\n----\n\n'
             + '<a href="https://www.geeks.ltd.uk/" target="_blank" style="color: inherit; font-weight: normal; text-decoration: none;">Powered by Geeks Ltd</a>'
          })
        }
      ]

    }
  </script>
  <script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
  <script type="text/javascript" src="components/prism-clike.min.js"></script>
  <script src="https://unpkg.com/docsify-copy-code"></script>
  <script src="//unpkg.com/docsify/lib/plugins/search.min.js"></script>
</body>
</html>

@Mohsens22
Copy link
Author

with this

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>MSharp documents</title>
  <link rel="icon" href="_media/favicon.ico">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <meta name="keywords" content="doc,docs,dotnet,core,mvc,Msharp,geeks,geeksltd">
  <meta name="description" content="MSharp documents">
  <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
</head>
<body>
  <div id="app">Loading ...</div>
  <script>
    window.$docsify = {
      notFoundPage: '_media/404.md',
      auto2top: true,
      executeScript: true,
      loadSidebar: true,
      mergeNavbar: true,
      maxLevel: 4,
      subMaxLevel: 2,
      name: 'MSharp docs',
      search: {
        noData: {
          '/': 'No results!'
        },
        paths: 'auto',
        placeholder: {
          '/': 'Search'
        }
      },
      formatUpdated: '{MM}/{DD} {HH}:{mm}',
      plugins: [
        function (hook, vm) {
          hook.beforeEach(function (html) {
            var url = 'https://github.com/geeksltd/MSharp.Docs/blob/master/' + vm.route.file
            var editHtml = '[:memo: Edit Document](' + url + ')\n'
            return editHtml
             + html
             + '\n\n----\n\n'
             + '<a href="https://www.geeks.ltd.uk/" target="_blank" style="color: inherit; font-weight: normal; text-decoration: none;">Powered by Geeks Ltd</a>'
          })
        }
      ]

    }
  </script>
  <script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
  <script type="text/javascript" src="components/prism-clike.min.js"></script>
  <script src="//unpkg.com/prismjs/components/prism-csharp.min.js"></script>
  <script src="https://unpkg.com/docsify-copy-code"></script>
  <script src="//unpkg.com/docsify/lib/plugins/search.min.js"></script>
</body>
</html>

I got this:
image

Which must be this:
image

@Mohsens22
Copy link
Author

I fixed this with this:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>MSharp documents</title>
  <link rel="icon" href="_media/favicon.ico">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <meta name="keywords" content="doc,docs,dotnet,core,mvc,Msharp,geeks,geeksltd">
  <meta name="description" content="MSharp documents">
  <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
  <link rel="stylesheet" href="//unpkg.com/prismjs/themes/prism-coy.css">
</head>
<body>
  <div id="app">Loading ...</div>
  <script>
    window.$docsify = {
      notFoundPage: '_media/404.md',
      auto2top: true,
      executeScript: true,
      loadSidebar: true,
      mergeNavbar: true,
      maxLevel: 4,
      subMaxLevel: 2,
      name: 'MSharp docs',
      search: {
        noData: {
          '/': 'No results!'
        },
        paths: 'auto',
        placeholder: {
          '/': 'Search'
        }
      },
      formatUpdated: '{MM}/{DD} {HH}:{mm}',
      plugins: [
        function (hook, vm) {
          hook.beforeEach(function (html) {
            var url = 'https://github.com/geeksltd/MSharp.Docs/blob/master/' + vm.route.file
            var editHtml = '[:memo: Edit Document](' + url + ')\n'
            return editHtml
             + html
             + '\n\n----\n\n'
             + '<a href="https://www.geeks.ltd.uk/" target="_blank" style="color: inherit; font-weight: normal; text-decoration: none;">Powered by Geeks Ltd</a>'
          })
        }
      ]

    }
  </script>
  <script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
  <script type="text/javascript" src="components/prism-clike.min.js"></script>
  <script src="//unpkg.com/prismjs/components/prism-csharp.min.js"></script>
  <script src="https://unpkg.com/docsify-copy-code"></script>
  <script src="//unpkg.com/docsify/lib/plugins/search.min.js"></script>
</body>
</html>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants