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

fix: correct ordered list start number rendering #457

Merged
merged 3 commits into from
Dec 8, 2024

Conversation

dribble-njr
Copy link
Member

  • 修复有序列表序号渲染错误
image

而在 marked 中:

image
  • 无序列表嵌套有序列表样式错误
image image

Copy link

github-actions bot commented Dec 6, 2024

⚡️ Deploying PR Preview...

@yanglbme
Copy link
Member

yanglbme commented Dec 6, 2024

奇怪,预览没成功

@yanglbme
Copy link
Member

yanglbme commented Dec 6, 2024

这个复制到公众号,还是有问题噢 @dribble-njr

@dribble-njr
Copy link
Member Author

dribble-njr commented Dec 6, 2024

这个复制到公众号,还是有问题噢 @dribble-njr

看起来微信不支持 li 里面插入 ol。

image

我注意到这里有一个转换的代码,会将 ol 按顺序排,注释之后,将生成的 html 用 live server 打开,能正常显示,但是复制到微信公众号还是异常。

<ul
  style=" text-align: left; line-height: 1.75; font-family: -apple-system-font,BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB , Microsoft YaHei UI , Microsoft YaHei ,Arial,sans-serif; font-size: 14px; list-style: circle; padding-left: 1em; margin-left: 0; color: #3f3f3f;margin-transform: translateY( 0"
>
  <li
    style="
      text-align: left;
      line-height: 1.75;
      font-family: -apple-system)-font,BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB , Microsoft YaHei UI , Microsoft YaHei ,Arial,sans-serif;
      font-size: 14px;
      text-indent: -1em;
      display: flex;
      align-items: center;
      margin: 0.2em 8px;
      color: #3f3f3f;
    "
  ><ol
      style="
        text-align: left;
        line-height: 1.75;
        font-family:
          -apple-system-font,
          BlinkMacSystemFont,
          Helvetica Neue,
          PingFang SC,
          Hiragino Sans GB,
          Microsoft YaHei UI,
          Microsoft YaHei,
          Arial,
          sans-serif;
        font-size: 14px;
        padding-left: 1em;
        margin-left: 0;
        color: #3f3f3f;
      "
    >
      <li
        style="
          text-align: left;
          line-height: 1.75;
          font-family:
            -apple-system-font,
            BlinkMacSystemFont,
            Helvetica Neue,
            PingFang SC,
            Hiragino Sans GB,
            Microsoft YaHei UI,
            Microsoft YaHei,
            Arial,
            sans-serif;
          font-size: 14px;
          text-indent: -1em;
          display: flex;
          align-items: center;
          margin: 0.2em 8px;
          color: #3f3f3f;
        "
      >
        1. fdsaf jhjhjh - klk
      </li>
    </ol>
  </li>
</ul>
image image

@dribble-njr dribble-njr changed the title fix: list render fix: correct ordered list start number rendering Dec 6, 2024
@yanglbme yanglbme merged commit 1e887fe into doocs:main Dec 8, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants