Strange list formatting with markdown

markdown

(jedie) #1

I copy&paste a list via firefox under win8 and get this:

  • ~/syncthing_test/
      * instance1/
        * /syncthing_configs/config.xml
      * instance2/
        * /syncthing_configs/config.xml

copy the same content into code tags looks like this:

* ~/syncthing_test/
  * instance1/
    * /syncthing_configs/**config.xml**
  * instance2/
    * /syncthing_configs/**config.xml**

screenshot: http://snag.gy/CzBjM.jpg (new user can insert images here)


(jedie) #2

(Because of Sorry, new users can only put 2 links in a post.)

see also: Babelmark 2 - Compare markdown implementations+~%2Fsyncthing_test%2F%0A+++instance1%2F%0A+++++%2Fsyncthing_configs%2Fconfig.xml%0A+++instance2%2F%0A++++*+%2Fsyncthing_configs%2Fconfig.xml


(jedie) #3

(Because of Sorry, new users can only put 2 links in a post.)

see also:
https://discourse.syncthing.net/t/forum-formatting-source-code-is-strange/408/4


(jedie) #4

copy&paste with chrome under win 8 works fine:

  • ~/syncthing_test/
    • instance1/
      • /syncthing_configs/config.xml
    • instance2/
      • /syncthing_configs/config.xml

(Jeff Atwood) #5

To put other Markdown blocks in a list just indent four spaces for each nesting level

I don’t see four spaces in your example, so that’s not valid Markdown.

* ~/syncthing_test/
  * instance1/
    * /syncthing_configs/**config.xml**
  * instance2/
    * /syncthing_configs/**config.xml**
1234567890123456789012345678901234567890
                   111111111122222222223                 

This is correct

1. Lists in a list item:
    - Indented four spaces.
        * indented eight spaces.
    - Four spaces again.

(jedie) #6

copy&paste with four spaces:

  • ~/syncthing_test/
        * instance1/
            * /syncthing_configs/config.xml
        * instance2/
            * /syncthing_configs/config.xml

same content paste into code block:

* ~/syncthing_test/
    * instance1/
        * /syncthing_configs/**config.xml**
    * instance2/
        * /syncthing_configs/**config.xml**

Same content looks fine here:

Babelmark 2 - Compare markdown implementations+~%2Fsyncthing_test%2F%0A+++++instance1%2F%0A+++++++++%2Fsyncthing_configs%2Fconfig.xml%0A+++++instance2%2F%0A++++++++*+%2Fsyncthing_configs%2Fconfig.xml#results

  • ~/syncthing_test/
        * instance1/
            * /syncthing_configs/config.xml
        * instance2/
            * /syncthing_configs/config.xml

screenshot: http://snag.gy/hIXGh.jpg


(Jeff Atwood) #7

Copying and pasting a list from where? I really have no idea what you are talking about here. This is not a WYSIWYG editor, it’s plain text.


(jedie) #8

Just, copy&paste from this thread (content from the posts before) into the reply textbox.

Or i just use the quote function:

Same quote copy&paste into code block:

[quote="jedie, post:6, topic:16613"]
same content paste into code block:

* ~/syncthing_test/
    * instance1/
        * /syncthing_configs/**config.xml**
    * instance2/
        * /syncthing_configs/**config.xml**
[/quote]

Seems that firefox under win8 change the spaces?!?


(NODA, Kai) #9

Debian testing x86_64 Iceweasel (Firefox)

  • a

    • b
      • c
        • d
  • a

    • b
      • c
        • d

The second nested list was copy-and-pasted from the first and looks identical to the first on the code editor:

- a
    - b
        - c
            - d

- a
    - b
        - c
            - d

(NODA, Kai) #10

In fact the copied nested list looks weirder on the WYSIWYG rendering

  • a
    • b
      • c
        • d
  • a
    • b
      • c
        • d

Again, this is what they look like on the text editor:

- a
    - b
        - c
            - d
- a
    - b
        - c
            - d

Screenshot here: https://twitter.com/nodakai/status/627709989067460608/photo/1
(Sorry but I was told that being a new user, I couldn’t post an image)