bhollis / maruku

A pure-Ruby Markdown-superset interpreter (Official Repo).
MIT License
500 stars 80 forks source link

list items cannot contain just puntuation (if there's no alphanumeric characters, it doesn't work) #1

Closed beccasaurus closed 11 years ago

beccasaurus commented 15 years ago

to reproduce: Maruku.new("* alpha\n* ?.,/~!@$%^&()-") Maruku.new("1. first\n2. second\n3. ?\n4. profit!") Maruku.new("* first\n* ?\n* third")

I think there's a good use-case for a

  • to merely contain punctuation, eg:

    1. foo
    2. bar
    3. ?
    4. profit!
  • beccasaurus commented 15 years ago

    I forked and created a failing spec: http://github.com/remi/maruku/raw/8d0e002dc97b1993d37fe345fcf464f543b4a98c/spec/block_docs/lists12.md

    gioele commented 14 years ago

    This issue is a real problem for documents written in non-latin scripts.

    The following snippet (from the Japanese translation of the Pro Git book) is not recognised as a bullet list

    *       スピード
    *       シンプルな設計
    *       ノンリニア開発(数千の並列ブランチ)への強力なサポート
    *       完全な分散
    *       Linux
    draftcode commented 13 years ago

    This issue can be fixed by modifying the "line_md_type" method in "type_detection.rb". I don't know why a list item needs containing at least one alphanumeric character, but its parsing rule written in that file says it needs so.

    distler commented 13 years ago

    I think this is fixed properly on my Nokogiri branch.

    bhollis commented 11 years ago

    I've confirmed that this is fixed in master.