logseq / logseq

A privacy-first, open-source platform for knowledge management and collaboration. Download link: http://github.com/logseq/logseq/releases. roadmap: http://trello.com/b/8txSM12G/roadmap
https://logseq.com
GNU Affero General Public License v3.0
33.22k stars 1.94k forks source link

inserted HTML table display `id:xxxxxx` after referenced #7671

Open TITC opened 1 year ago

TITC commented 1 year ago

What Happened?

image

Reproduce the Bug

  1. create a block and paste blow code in it

    <table>
    <tr>
    <td ></td>
    <td>码制</td>
    <td>添补代码</td>
    </tr>
    <tr>
    <td >正数</td>
    <td>原码、补码、反码</td>
    <td>0</td>
    </tr>
    <tr>
    <td rowspan="4"  style="background-color: #1aa252">负数</td>
    <td>原码</td>
    <td>0</td>
    </tr>
    <tr>
    <td rowspan="2" style="background-color: #92b8d5">补码</td>
    <td>左移添0</td>
    </tr>
    <tr>
    <td>右移添1</td>
    </tr>
    <tr>
    <td>反码</td>
    <td>1</td>
    </tr>
    </table>
  2. make a reference to this block

Expected Behavior

Hidden id:xxxxxx like other referenced block. image

Screenshots

No response

Desktop or Mobile Platform Information

Edition Windows 11 Home
Version 21H2
Installed on    ‎6/‎24/‎2022
OS build    22000.1219
Experience  Windows Feature Experience Pack 1000.22000.1219.0

logseq 0.8.11

Additional Context

No response

cnrpman commented 1 year ago

Cannot reproduce:

image

This is what I saw in the raw file, id:: is provided.

image

The id shown in editor should be removable if there are two id:: in your file.

TITC commented 1 year ago

keep from disturbing by third-party plugins and themes, I closed all of them this time, is there anything I can do to reproduce it?

https://user-images.githubusercontent.com/35098797/206881890-dc69099c-d639-4bf4-9c1f-880d17da2f98.mp4

cnrpman commented 1 year ago

Please provide your rawfile for comparison

This is what I saw in the raw file, id:: is provided.

TITC commented 1 year ago

image

code in markdown file as below

                    - <table>
                      id:: 638d5f7c-2fcb-4661-8c33-fc1771bb627a
                       <tr>
                          <td ></td>
                          <td>码制</td>
                          <td>添补代码</td>
                       </tr>
                       <tr>
                          <td >正数</td>
                          <td>原码、补码、反码</td>
                          <td>0</td>
                       </tr>
                       <tr>
                          <td rowspan="4"  style="background-color: #1aa252">负数</td>
                          <td>原码</td>
                          <td>0</td>
                       </tr>
                       <tr>
                          <td rowspan="2" style="background-color: #92b8d5">补码</td>
                          <td>左移添0</td>
                       </tr>
                       <tr>
                          <td>右移添1</td>
                       </tr>
                       <tr>
                          <td>反码</td>
                          <td>1</td>
                       </tr>
                      </table>
cnrpman commented 1 year ago

Can you move the id:: <balbabla> to the outside of the <table>, similar to this: image

TITC commented 1 year ago

yeah, it can be hidden after giving a title to this block or manually change id:: <balbabla> position, but what I hope is logseq can automatically move it outside of the <table>.

like other blocks after referenced, I don't need to change it manually.

image

cnrpman commented 1 year ago

It is in the outside automatically in my case. Sounds you have some manual editing to the raw file. And the automatically move it outside of the <table>. is non-sense as there are numerous similar cases if the files are manually edited..

TITC commented 1 year ago

I create new journal and just ctrl+c then it generated id:: xxxxx under <table>

https://user-images.githubusercontent.com/35098797/206907962-c87f81e2-8ec7-46c8-82f6-da852c7517c6.mp4

and the same phenomenon can be observed when I press Enter to create a new block.

https://user-images.githubusercontent.com/35098797/206908309-0aea317c-043e-4830-b7e7-0ef3ead98221.mp4

I haven't change any markdown files as the above video shown.

cnrpman commented 1 year ago

I see. PR is welcome for this.