“Unexpected indentation” with restructuredtext list

倖福魔咒の 提交于 2019-12-11 01:49:12

问题


I did not succeed to get a simple 3 levels indented list with Restructuredtext:

$ cat test.rst 
Title
======

- aaaa
  - aaaa2
  - aaaa2
      - aaaa3
- aaaa
- aaaa

Ok

$ rst2html test.rst > /tmp/a.html
test.rst:7: (ERROR/3) Unexpected indentation.
$ 

I've try different combination of spaces in front of aaaa3 but I get in all cases (ERROR/3) Unexpected indentation.


回答1:


Nested lists are tricky because different levels require blank lines between those levels.

Nested lists are possible, but be aware that they must be separated from the parent list items by blank lines

This should work:

- aaaa

  - aaaa2
  - aaaa2

    - aaaa3

- aaaa
- aaaa


来源:https://stackoverflow.com/questions/44557957/unexpected-indentation-with-restructuredtext-list

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!