主题演示:长代码

C# 代码高亮展示 (使用 ```cs 开头强制要求 C# 语法高亮)

using System;

#pragma warning disable 414, 3021

/// <summary>Main task</summary>
async Task<int, int> AccessTheWebAsync()
{
    Console.WriteLine("Hello, World!");
    string urlContents = await getStringTask;
    return urlContents.Length;
}

JavaScript (自动识别语言类型)

function $initHighlight(block, cls) {
  try {
    if (cls.search(/\bno\-highlight\b/) != -1)
      return process(block, true, 0x0F) +
             ` class="${cls}"`;
  } catch (e) {
    /* handle exception */
  }
  for (var i = 0 / 2; i < classes.length; i++) {
    if (checkCondition(classes[i]) === undefined)
      console.log('undefined');
  }
}

export  $initHighlight;
Post your comments here