xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

Markdown Table shows multi lines text All In One

Markdown Table shows multi lines text All In One

Markdown Table 显示多行文本 / 换行

HTML tag <br/>


| name | desc |
|--|--|
| one line | abc|
| multi llines with `\n` | abc \n xyz |
| multi llines with `<br/>` | abc <br/> xyz |
| sql demo | MySQL 用户名首字母转换成大写,其余的小写字母<br/>\`\`\`sql<br/> `# ✅ SELECT user_id,`  <br/>`CONCAT(UCASE(LEFT(name, 1)), LCASE(SUBSTRING(name, 2, LENGTH(name)))) AS name` <br/>`FROM Users`<br/>`ORDER BY user_id; `<br/>\`\`\`|

name desc
one line abc
multi llines with \n abc \n xyz
multi llines with <br/> abc
xyz
sql demo MySQL 用户名首字母转换成大写,其余的小写字母
```sql
# ✅ SELECT user_id,
CONCAT(UCASE(LEFT(name, 1)), LCASE(SUBSTRING(name, 2, LENGTH(name)))) AS name
FROM Users
ORDER BY user_id;
```

HTML tag <pre> & <code> & &nbsp; & <br/>

<pre>pre</pre>&nbsp;<code>code</code>
<pre>pre</pre>&nbsp;<code>code</code>
| name | desc |
|--|--|
| one line | abc|
| multi llines with `\n` | abc \n xyz |
| multi llines with `<pre>` | <pre>abc \n xyz</pre> |
| multi llines with `<pre> <br/>` | <pre>abc <br/> xyz</pre> |
| multi llines with `<pre> &nbsp;` | <pre>abc &nbsp;&nbsp;&nbsp; xyz</pre> |
name desc
one line abc
multi llines with <pre>
abc \n xyz
multi llines with <pre> &nbsp;
abc     xyz
multi llines with <pre> &nbsp;
abc     xyz

refs

https://alvinalexander.com/text/how-put-multiple-lines-markdown-table-cell-multiline-table/

https://stackoverflow.com/questions/24190085/markdown-multiline-code-blocks-in-tables-when-rows-have-to-be-specified-with-one

https://github.com/markdown-it/markdown-it/issues/406



©xgqfrms 2012-2020

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!


posted @ 2022-10-11 09:14  xgqfrms  阅读(92)  评论(1编辑  收藏  举报