Správně označení více vnořených seznamů ve stejnou položku seznamu

0

Otázka

V GitHub .md soubor, snažím se napsat ekvivalent:

<ul>
  <li>This is a list item</li>
  
  <li>This is also a list item
  
    <ul>
      <li>...containing a sublist</li>
      <li>with two items.</li>
    </ul>
    
    and then...
    
    <ul>
      <li>another sublist</li>
      <li>which also has two items</li>
    </ul>
  </li>
  
  <li>This is a third list item</li>
</ul>

Snažil jsem se četné variace na:

 - This is a list item
 - This is also a list item
   - ...containing a sublist
   - with two items.
 
   and then...
 
   - another sublist
   - which also has two items
  - This is a third list item

ale ještě jsem nenašel, jak úspěšně hnízdí více samostatné nečíslované seznamy v jeden nečíslovaný seznam.

Jak bych měl označit řádek and then... tak, že (a každý řádek po něm) se vykresluje správně ve GitHub ochucené markdown?

1

Nejlepší odpověď

-1

Můžete použít falešné bullet seznamy k dosažení tohoto cíle. Můžete vytvořit je pomocí non-breaking mezery a ⦁ (Z NOTACE MÍSTĚ) charakter.

 - This is a list item
 - This is also a list item&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;⦁&nbsp;&nbsp;...containing a sublist&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;⦁&nbsp;&nbsp;with two items.
 
   and then...
 
&nbsp;&nbsp;&nbsp;⦁&nbsp;&nbsp;another sublist&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;⦁&nbsp;&nbsp;which also has two items
 - This is a third list item

Výsledek:

  • Toto je seznam položka

  • To je také položka seznamu
    ⦁ ...obsahující dílčí
    ⦁ s dvě položky.

    a pak...

    ⦁ další dílčí
    ⦁ , který má také dvě položky

  • Toto je třetí položka seznamu

2021-11-23 21:10:43

Díky, @TamásSengel - velmi ceněn.
Rounin

V jiných jazycích

Tato stránka je v jiných jazycích

Русский
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................