Giter Site home page Giter Site logo

Comments (10)

lyricat avatar lyricat commented on September 18, 2024

粘贴到微信后,有没有去用鼠标点一下代码块?

from wechat-format.

WeihanLi avatar WeihanLi commented on September 18, 2024

应该没

from wechat-format.

WeihanLi avatar WeihanLi commented on September 18, 2024

我重新尝试编辑了这篇文章,有的是这样的

image

我手动调整了一下,如下图所示,上面框中的是正常显示的(与前面的行号数字之间有两个空格)

image

显示效果:

image

能否自动格式化一下?优化一下显示?

from wechat-format.

lyricat avatar lyricat commented on September 18, 2024

我不能复现你的问题
image

from wechat-format.

WeihanLi avatar WeihanLi commented on September 18, 2024
## C# 7

- out 变量(`int.TryParse("123", out var num);`)
- 优化元祖支持,支持变量名(`(int max,int min) top = (3,1);`)
- 废弃变量(`if(int.TryParse("123",out _))`)
- 模式匹配(`if(abc is int num)`switch...case支持模式匹配)
- ref local and ref return(`ref return 123;`)
- 本地方法(局部方法)
- 更多的支持表达式体方法(增加支持属性和索引器上实现构造函数、终结器以及 get 和 set 访问器)
- throw表达式
- 数字文本语法改进

    误读的数值常量可能使第一次阅读代码时更难理解。 当这些数字被用作位掩码或其他符号而非数字值时,通常会发生这种情况。 C# 7.0 包括两项新功能,使得更容易以最可读的方式写入数字来用于预期用途:二进制文本和数字分隔符

    ``` csharp
    public const int Sixteen =   0b0001_0000;
    public const int ThirtyTwo = 0b0010_0000;
    public const int SixtyFour = 0b0100_0000;
    public const int OneHundredTwentyEight = 0b1000_0000;

    public const long BillionsAndBillions = 100_000_000_000;

    public const double AvogadroConstant = 6.022_140_857_747_474e23;
    public const decimal GoldenRatio = 1.618_033_988_749_894_848_204_586_834_365_638_117_720_309_179M;
    ```

你可以用这一段markdown测试,在在线版的编辑器里是这样的效果

image

from wechat-format.

lyricat avatar lyricat commented on September 18, 2024

这个语法不对。把 "```" 之前的四个空格去掉就行了。

public const int Sixteen =   0b0001_0000;
public const int ThirtyTwo = 0b0010_0000;
public const int SixtyFour = 0b0100_0000;
public const int OneHundredTwentyEight = 0b1000_0000;

public const long BillionsAndBillions = 100_000_000_000;

public const double AvogadroConstant = 6.022_140_857_747_474e23;
public const decimal GoldenRatio = 1.618_033_988_749_894_848_204_586_834_365_638_117_720_309_179M;

from wechat-format.

WeihanLi avatar WeihanLi commented on September 18, 2024

只是一个缩进,需要作为上面的 “数字文本语法改进” 的子元素显示,如果去掉空格就直接显示的样式都变了

这个是在博客园上显示的效果

image

简书的显示效果

image

from wechat-format.

lyricat avatar lyricat commented on September 18, 2024

那没啥好办法,因为这里代码块使用了微信原生的版本。他们没考虑这个问题。

from wechat-format.

WeihanLi avatar WeihanLi commented on September 18, 2024

好吧,感谢解答~

from wechat-format.

lyricat avatar lyricat commented on September 18, 2024

那我关掉了

from wechat-format.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.