md4c icon indicating copy to clipboard operation
md4c copied to clipboard

Table not detected unless preceded by blank line

Open lhasiuk opened this issue 9 months ago • 3 comments

I am encountering a situation where md4c does not recognize a table unless it is preceded by a blank line. The Markdown that I am seeing this issue with is below. I am using MD_FLAG_TABLES as a parser flag. If I add an extra newline before the table, then it correctly converts it to an HTML table. Github treats it as a table without the blank line. I've pasted the Markdown below twice, once escaped so you can see it as Markdown and the second time as raw text so that Github can display it, allowing you to see it as a table.

As the concept of digital nomadism continues to gain popularity, many locations around the world are becoming increasingly attractive to remote workers. The key factors that make a place appealing to digital nomads include reliable internet, cost of living, community, and workspaces. Some of the key characteristics of ideal digital nomad destinations are:
* **Reliable Internet**: Fast and stable internet connectivity is essential for digital nomads to stay productive and connected with clients and teams.
* **Cost of Living**: A lower cost of living can help digital nomads stretch their budget further and enjoy a better quality of life.
* **Community**: A thriving community of like-minded individuals can provide support, networking opportunities, and a sense of belonging.
* **Workspaces**: Access to co-working spaces, cafes, and other work-friendly environments can help digital nomads stay focused and productive.

## **Asia**:
Some of the top destinations for digital nomads in Asia include:
* **Bali, Indonesia**: Known for its tropical climate, low cost of living, and thriving community of remote workers [8].
* **Chiang Mai, Thailand**: A popular hub for digital nomads, with a large community, reliable internet, and affordable cost of living.
* **India**: With 1,936 digital-nomad-friendly rooms available, India is a great option for remote workers looking for a mix of culture, food, and work opportunities [6].

## **Europe**:
Some of the top destinations for digital nomads in Europe include:
* **Lisbon, Portugal**: Ranked as one of the best cities for digital nomads, with a high quality of life, favorable climate, and digital nomad visa program [4].
* **Madrid, Spain**: Offers a great quality of life, safety, and low taxes, making it an attractive destination for remote workers [5].
* **Vlorë, Albania**: A growing community of remote workers, stunning coastlines, and a low cost of living make Vlorë an ideal spot for digital nomads [2].
* **Faro, Portugal**: Sunny, oceanfront, and affordable, Faro is set up for the nomad lifestyle, with excellent connectivity and a digital nomad visa program [2].

## **Americas**:
Some of the top destinations for digital nomads in the Americas include:
* **Columbus, Ohio**: Ranked as the best city for digital nomads in the US, with a low cost of living and abundance of coffee shops and independent bookstores [1].
* **Mexico**: A popular destination for US digital nomads, with a low cost of living, rich culture, and easy access to the US.

## **Comparison**:
A comparison of some of the top destinations for digital nomads reveals varying costs of living, internet speeds, and community sizes. For example:
| **Location** | **Cost of Living** | **Internet Speed** |
|-------------|-------------------|-------------------|
| Chiang Mai  | Low               | Fast              |
| Lisbon      | Medium            | Very Fast         |
| Bali        | Low               | Fast              |

**The Gist**: When choosing a location as a digital nomad, it's essential to consider factors such as reliable internet, cost of living, community, and workspaces. With many destinations around the world catering to remote workers, digital nomads can find a location that suits their lifestyle, budget, and preferences. Whether it's the beaches of Bali, the culture of Lisbon, or the affordability of Chiang Mai, there's a perfect spot for every digital nomad [2] [4] [8].

As the concept of digital nomadism continues to gain popularity, many locations around the world are becoming increasingly attractive to remote workers. The key factors that make a place appealing to digital nomads include reliable internet, cost of living, community, and workspaces. Some of the key characteristics of ideal digital nomad destinations are:

  • Reliable Internet: Fast and stable internet connectivity is essential for digital nomads to stay productive and connected with clients and teams.
  • Cost of Living: A lower cost of living can help digital nomads stretch their budget further and enjoy a better quality of life.
  • Community: A thriving community of like-minded individuals can provide support, networking opportunities, and a sense of belonging.
  • Workspaces: Access to co-working spaces, cafes, and other work-friendly environments can help digital nomads stay focused and productive.

Asia:

Some of the top destinations for digital nomads in Asia include:

  • Bali, Indonesia: Known for its tropical climate, low cost of living, and thriving community of remote workers [8].
  • Chiang Mai, Thailand: A popular hub for digital nomads, with a large community, reliable internet, and affordable cost of living.
  • India: With 1,936 digital-nomad-friendly rooms available, India is a great option for remote workers looking for a mix of culture, food, and work opportunities [6].

Europe:

Some of the top destinations for digital nomads in Europe include:

  • Lisbon, Portugal: Ranked as one of the best cities for digital nomads, with a high quality of life, favorable climate, and digital nomad visa program [4].
  • Madrid, Spain: Offers a great quality of life, safety, and low taxes, making it an attractive destination for remote workers [5].
  • Vlorë, Albania: A growing community of remote workers, stunning coastlines, and a low cost of living make Vlorë an ideal spot for digital nomads [2].
  • Faro, Portugal: Sunny, oceanfront, and affordable, Faro is set up for the nomad lifestyle, with excellent connectivity and a digital nomad visa program [2].

Americas:

Some of the top destinations for digital nomads in the Americas include:

  • Columbus, Ohio: Ranked as the best city for digital nomads in the US, with a low cost of living and abundance of coffee shops and independent bookstores [1].
  • Mexico: A popular destination for US digital nomads, with a low cost of living, rich culture, and easy access to the US.

Comparison:

A comparison of some of the top destinations for digital nomads reveals varying costs of living, internet speeds, and community sizes. For example:

Location Cost of Living Internet Speed
Chiang Mai Low Fast
Lisbon Medium Very Fast
Bali Low Fast

The Gist: When choosing a location as a digital nomad, it's essential to consider factors such as reliable internet, cost of living, community, and workspaces. With many destinations around the world catering to remote workers, digital nomads can find a location that suits their lifestyle, budget, and preferences. Whether it's the beaches of Bali, the culture of Lisbon, or the affordability of Chiang Mai, there's a perfect spot for every digital nomad [2] [4] [8].

lhasiuk avatar Mar 31 '25 15:03 lhasiuk

Hi (I'm not the author), according to this project's table extension specification you do need to add an empty line before and after a table; refer to https://github.com/mity/md4c/blob/481fbfbdf72daab2912380d62bb5f2187d438408/test/spec-tables.txt#L139 and https://github.com/mity/md4c/blob/481fbfbdf72daab2912380d62bb5f2187d438408/test/spec-tables.txt#L157.

step- avatar Mar 31 '25 17:03 step-

Hi (I'm not the author), according to this project's table extension specification you do need to add an empty line before and after a table; refer to

md4c/test/spec-tables.txt

Line 139 in 481fbfb

The table cannot interrupt a paragraph.

and md4c/test/spec-tables.txt

Line 157 in 481fbfb

Similarly, paragraph cannot interrupt a table: .

Thanks. I wasn't able to find that in any Markdown spec anywhere. Do you know if that is part of the CommonMark specification?

lhasiuk avatar Apr 03 '25 18:04 lhasiuk

No, tables are not part of CommonMark, they are an extensions. BTW, GitHub implements cmark-gfm, not CommonMark. And tables are an extension there too.

step- avatar Apr 03 '25 18:04 step-