Giter Club home page Giter Club logo

Comments (3)

kivikakk avatar kivikakk commented on August 25, 2024

👋 Thanks for the report! It looks like the table extension doesn't get to fire before the ordered list parser, causing this strange result.

comrak is pretty much a straight copy of the GitHub cmark-gfm code, which is why they render the same, so I guess technically this is an issue with cmark-gfm. I'll try to fix this first in github/cmark, and then copy the fix across here.

from comrak.

kivikakk avatar kivikakk commented on August 25, 2024

(Note that, as a work around, you can include a leading |)

from comrak.

kivikakk avatar kivikakk commented on August 25, 2024

I've reviewed the code and the spec a bit, and it looks like this probably isn't something we can "fix" without actually altering the spec (which I'm loathe to do). See here:

The table is broken at the first empty line, or beginning of another block-level structure:

| abc | def |
| --- | --- |
| bar | baz |
> bar
abc def
bar baz

bar

In order to preserve logical parsing precedence rules, it'd be pretty difficult to have that last line interpreted as part of the table if and only if there was a pipe (|) character located somewhere in it.

pulldown-cmark's parsing strategy for tables differs quite a bit, which is why this "works" there, but without breaking examples like the above (and/or big hacks), I don't think we'll be able to achieve this in GFM.

So, I think the solution will be to prefix the table with pipes:

| Number | Tag | Description
| -------|-----|---------
| 1.     | CC  | Coordinating conjunction
| 2.     | CD  | Cardinal number
| 3.     | DT  | Determiner
| 4.     | EX  | Existential there

Producing:

Number Tag Description
1. CC Coordinating conjunction
2. CD Cardinal number
3. DT Determiner
4. EX Existential there

from comrak.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.