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

Ordered lists are persisted with an <ol> tag for each <li> element. There should be only one <ol> tag for each list in Markdown. #3216

Closed
altgene opened this issue Apr 12, 2024 · 0 comments
Labels
bug Something isn't working Stale

Comments

@altgene
Copy link

altgene commented Apr 12, 2024

Describe the bug

When entering an ordered markdown list, the autocomplete functionality correctly rendering the incremented numbered list since v.0.21.

However the list is persisted with one <li> per <ol>. Instead, multiple <li> should be surrounded by <ol>.

Steps to reproduce

  1. Start a new note
  2. Type in an order list as follows:
1. test
2. test
  1. Click Save button
  2. Check the
      in generated memo using Inspect feature of the browser.
      NOTICE: There are multiple
        tags instead of a single one for the list. Specifically, there is an
          for each

        The version of Memos you're using

        0.21

        Screenshots or additional context

        Sample HTML output for the following markdown in a saved note is presented as:

        1. test
        2. test
        3. test
        <div
          class="w-full max-w-full word-break text-base leading-snug space-y-2 whitespace-pre-wrap"
        >
          <ol>
            <li class="w-full flex flex-row">
              <div class="w-auto grid grid-cols-[24px_1fr] gap-1">
                <div class="w-7 h-6 flex justify-center items-center">
                  <span class="opacity-80">1.</span>
                </div>
                <div><span>test</span></div>
              </div>
            </li>
          </ol>
          <ol>
            <li class="w-full flex flex-row">
              <div class="w-auto grid grid-cols-[24px_1fr] gap-1">
                <div class="w-7 h-6 flex justify-center items-center">
                  <span class="opacity-80">2.</span>
                </div>
                <div><span>test</span></div>
              </div>
            </li>
          </ol>
          <ol>
            <li class="w-full flex flex-row">
              <div class="w-auto grid grid-cols-[24px_1fr] gap-1">
                <div class="w-7 h-6 flex justify-center items-center">
                  <span class="opacity-80">3.</span>
                </div>
                <div><span>test</span></div>
              </div>
            </li>
          </ol>
        </div>
        

        Now if you copy text from the note, and paste it into a text editor (e.g. VS Code), the text appears as follows:
        1.
        test
        2.
        test
        3.
        test

@altgene altgene added the bug Something isn't working label Apr 12, 2024
@github-actions github-actions bot added the Stale label Apr 26, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Stale
Projects
None yet
Development

No branches or pull requests

1 participant