GithubHelp home page GithubHelp logo

remarkjs / remark-gfm Goto Github PK

View Code? Open in Web Editor NEW
615.0 10.0 22.0 124 KB

remark plugin to support GFM (autolink literals, footnotes, strikethrough, tables, tasklists)

Home Page: https://remark.js.org

License: MIT License

JavaScript 100.00%
remark remark-plugin gfm github autolink strikethrough table tasklist

remark-gfm's Introduction

remark-gfm

Build Coverage Downloads Size Sponsors Backers Chat

remark plugin to support GFM (autolink literals, footnotes, strikethrough, tables, tasklists).

Contents

What is this?

This package is a unified (remark) plugin to enable the extensions to markdown that GitHub adds with GFM: autolink literals (www.x.com), footnotes ([^1]), strikethrough (~~stuff~~), tables (| cell |…), and tasklists (* [x]). You can use this plugin to add support for parsing and serializing them. These extensions by GitHub to CommonMark are called GFM (GitHub Flavored Markdown).

This plugin does not handle how markdown is turned to HTML. That’s done by remark-rehype. If your content is not in English and uses footnotes, you should configure that plugin. When generating HTML, you might also want to enable rehype-slug to add ids on headings.

A different plugin, remark-frontmatter, adds support for frontmatter. GitHub supports YAML frontmatter for files in repos and Gists but they don’t treat it as part of GFM.

Another plugin, remark-github, adds support for how markdown works in relation to a certain GitHub repo in comments, issues, PRs, and releases, by linking references to commits, issues, and users.

Yet another plugin, remark-breaks, turns soft line endings (enters) into hard breaks (<br>s). GitHub does this in a few places (comments, issues, PRs, and releases).

When should I use this?

This project is useful when you want to support the same features that GitHub does in files in a repo, Gists, and several other places. Users frequently believe that some of these extensions, specifically autolink literals and tables, are part of normal markdown, so using remark-gfm will help match your implementation to their understanding of markdown. There are several edge cases where GitHub’s implementation works in unexpected ways or even different than described in their spec, so writing in GFM is not always the best choice.

If you just want to turn markdown into HTML (with maybe a few extensions such as GFM), we recommend micromark with micromark-extension-gfm instead. If you don’t use plugins and want to access the syntax tree, you can use mdast-util-from-markdown with mdast-util-gfm.

Install

This package is ESM only. In Node.js (version 16+), install with npm:

npm install remark-gfm

In Deno with esm.sh:

import remarkGfm from 'https://esm.sh/remark-gfm@4'

In browsers with esm.sh:

<script type="module">
  import remarkGfm from 'https://esm.sh/remark-gfm@4?bundle'
</script>

Use

Say our document example.md contains:

# GFM

## Autolink literals

www.example.com, https://example.com, and [email protected].

## Footnote

A note[^1]

[^1]: Big note.

## Strikethrough

~one~ or ~~two~~ tildes.

## Table

| a | b  |  c |  d  |
| - | :- | -: | :-: |

## Tasklist

* [ ] to do
* [x] done

…and our module example.js contains:

import rehypeStringify from 'rehype-stringify'
import remarkGfm from 'remark-gfm'
import remarkParse from 'remark-parse'
import remarkRehype from 'remark-rehype'
import {read} from 'to-vfile'
import {unified} from 'unified'

const file = await unified()
  .use(remarkParse)
  .use(remarkGfm)
  .use(remarkRehype)
  .use(rehypeStringify)
  .process(await read('example.md'))

console.log(String(file))

…then running node example.js yields:

<h1>GFM</h1>
<h2>Autolink literals</h2>
<p><a href="http://www.example.com">www.example.com</a>, <a href="https://example.com">https://example.com</a>, and <a href="mailto:[email protected]">[email protected]</a>.</p>
<h2>Footnote</h2>
<p>A note<sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref aria-describedby="footnote-label">1</a></sup></p>
<h2>Strikethrough</h2>
<p><del>one</del> or <del>two</del> tildes.</p>
<h2>Table</h2>
<table>
<thead>
<tr>
<th>a</th>
<th align="left">b</th>
<th align="right">c</th>
<th align="center">d</th>
</tr>
</thead>
</table>
<h2>Tasklist</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" disabled> to do</li>
<li class="task-list-item"><input type="checkbox" checked disabled> done</li>
</ul>
<section data-footnotes class="footnotes"><h2 class="sr-only" id="footnote-label">Footnotes</h2>
<ol>
<li id="user-content-fn-1">
<p>Big note. <a href="#user-content-fnref-1" data-footnote-backref class="data-footnote-backref" aria-label="Back to content"></a></p>
</li>
</ol>
</section>

API

This package exports no identifiers. The default export is remarkGfm.

unified().use(remarkGfm[, options])

Add support GFM (autolink literals, footnotes, strikethrough, tables, tasklists).

Parameters
  • options (Options, optional) — configuration
Returns

Nothing (undefined).

Options

Configuration (TypeScript type).

Fields
  • stringLength (((value: string) => number), default: d => d.length) — detect the size of table cells, used when aligning cells
  • singleTilde (boolean, default: true) — whether to support strikethrough with a single tilde; single tildes work on github.com, but are technically prohibited by GFM; you can always use 2 or more tildes for strikethrough
  • tablePipeAlign (boolean, default: true) — whether to align table pipes
  • tableCellPadding (boolean, default: true) — whether to add a space of padding between table pipes and cells

Examples

Example: singleTilde

To turn off support for parsing strikethrough with single tildes, pass singleTilde: false:

// …

const file = await unified()
  .use(remarkParse)
  .use(remarkGfm, {singleTilde: false})
  .use(remarkRehype)
  .use(rehypeStringify)
  .process('~one~ and ~~two~~')

console.log(String(file))

Yields:

<p>~one~ and <del>two</del></p>

Example: stringLength

It’s possible to align tables based on the visual width of cells. First, let’s show the problem:

import {remark} from 'remark'
import remarkGfm from 'remark-gfm'

const input = `| Alpha | Bravo |
| - | - |
| 中文 | Charlie |
| 👩‍❤️‍👩 | Delta |`

const file = await remark().use(remarkGfm).process(input)

console.log(String(file))

The above code shows how remark can be used to format markdown. The output is as follows:

| Alpha    | Bravo   |
| -------- | ------- |
| 中文       | Charlie |
| 👩‍❤️‍👩 | Delta   |

To improve the alignment of these full-width characters and emoji, pass a stringLength function that calculates the visual width of cells. One such algorithm is string-width. It can be used like so:

@@ -1,5 +1,6 @@
 import {remark} from 'remark'
 import remarkGfm from 'remark-gfm'
+import stringWidth from 'string-width'

@@ -10,7 +11,7 @@ async function main() {
 | 👩‍❤️‍👩 | Delta |`

-const file = await remark().use(remarkGfm).process(input)
+const file = await remark()
+  .use(remarkGfm, {stringLength: stringWidth})
+  .process(input)

   console.log(String(file))

The output of our code with these changes is as follows:

| Alpha | Bravo   |
| ----- | ------- |
| 中文  | Charlie |
| 👩‍❤️‍👩    | Delta   |

Bugs

For bugs present in GFM but not here, or other peculiarities that are supported, see each corresponding readme:

Authoring

For recommendations on how to author GFM, see each corresponding readme:

HTML

This plugin does not handle how markdown is turned to HTML. See remark-rehype for how that happens and how to change it.

CSS

For info on how GitHub styles these features, see each corresponding readme:

Syntax

For info on the syntax of these features, see each corresponding readme:

Syntax tree

For info on the syntax tree of these features, see each corresponding readme:

Types

This package is fully typed with TypeScript. It exports the additional type Options.

The node types are supported in @types/mdast by default.

Compatibility

Projects maintained by the unified collective are compatible with maintained versions of Node.js.

When we cut a new major release, we drop support for unmaintained versions of Node. This means we try to keep the current release line, remark-gfm@^4, compatible with Node.js 16.

This plugin works with remark-parse version 11+ (remark version 15+). The previous version (v3) worked with remark-parse version 10 (remark version 14). Before that, v2 worked with remark-parse version 9 (remark version 13). Earlier versions of remark-parse and remark had a gfm option that enabled this functionality, which defaulted to true.

Security

Use of remark-frontmatter does not involve rehype (hast) or user content so there are no openings for cross-site scripting (XSS) attacks.

Related

Contribute

See contributing.md in remarkjs/.github for ways to get started. See support.md for ways to get help.

This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.

License

MIT © Titus Wormer

remark-gfm's People

Contributors

christianmurphy avatar wooorm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

remark-gfm's Issues

Table is not rendered properly

Initial checklist

Affected packages and versions

remark-gfm v3.0.1

Link to runnable example

No response

Steps to reproduce

Following is a table markdown content, but remark-gfm can't render it properly:

| 模式 | 代表元素 | 描述 | 级别 |
| ------------------------------------ | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | ---------- | --- |
| \* | 任何元素 | 通用选择器 | 2 |
| E | 一个 E 类型的元素 | 类型选择器 | 1 |
| E[foo] | 一个具有 "foo" 属性的 E 元素 | 属性选择器 | 2 |
| E[foo="bar"] | 一个 E 元素,其 "foo" 属性值正好等于 "bar" | 属性选择器 | 2 |
| E[foo~="bar"] | 一个 E 元素,其 "foo" 属性值是一个以空白分隔的值,其中一个正好等于 "bar" | 属性选择器 | 2 |
| E[foo^="bar"] | 一个 E 元素,它的 "foo" 属性值正好以字符串 "bar" 开始 | 属性选择器 | 3 |
| E[foo$="bar"] | 一个 E 元素,其 "foo" 属性值正好以字符串 "bar" 结束 | 属性选择器 | 3 |
| E[foo*="bar"] | 一个 E 元素,其 "foo" 属性值包含子串 "bar" | 属性选择器 | 3 |
| E[foo | ="en"] | 一个 E 元素,其 "foo" 属性有一个以 "en" 开头的连字符分隔的值列表(从左边开始) | 属性选择器 | 2 |
| E:root | 一个 E 元素,文档的根结构 | 伪类 | 3 |
| E:nth-child(n) | 一个 E 元素,是其父元素的第 n 个子元素 | 结构性伪类 | 3 |
| E:nth-last-child(n) | 一个 E 元素,是其父元素的第 n 个子元素,从最后一个开始计算 | 结构性伪类 | 3 |
| E:nth-of-type(n) | 一个 E 元素,是其类型的第 n 个兄弟元素 | 结构性伪类 | 3 |
| E:nth-last-of-type(n) | 一个 E 元素,它的类型的第 n 个兄弟元素,从最后一个开始计算 | 结构性伪类 | 3 |
| E:first-child | 一个 E 元素,是其父元素的第一个子元素 | 结构性伪类 | 2 |
| E:last-child | 一个 E 元素,是其父元素的最后一个子元素 | 结构性伪类 | 3 |
| E:first-of-type | 一个 E 元素,其类型的第一个兄弟元素 | 结构化伪类 | 3 |
| E:last-of-type | 一个 E 元素,其类型的最后一个兄弟元素 | 结构性伪类 | 3 |
| E:only-child | 一个 E 元素,是其父元素的唯一子元素 | 结构性伪类 | 3 |
| E:only-of-type | 一个 E 元素,是其类型的唯一兄弟元素 | 结构性伪类 | 3 |
| E:empty | 一个 E 元素,没有子节点(包括文本节点) | 结构性伪类 | 3 |
| E:link 和 E:visited | 一个 E 元素是一个超链接的锚点,其目标尚未被访问(:link)或已经被访问(:visited) | 链接伪类 | 1 |
| E:activeE:hoverE:focus | 在某些用户操作期间的一个 E 元素 | 用户操作伪类 | 1 和 2 |
| E:target | 一个 E 元素,是引用 URI 的目标 | target 伪类 | 3 |
| E:lang(fr) | 一个语言为 "fr" 的 E 类型元素(文件语言指定如何确定语言) | :lang 伪类 | 2 |
| E:enabledE:disabled | 一个用户界面元素 E,它被启用或禁用 | UI 元素状态伪类 | 3 |
| E:checked | 一个被选中的用户界面元素 E(例如一个单选按钮或复选框) | UI 元素说明伪类 | 3 |
| E::first-line | 一个 E 元素的第一个格式化行 | ::first-line 伪元素 | 1 |
| E::first-letter | 一个 E 元素的第一个格式化的字母 | ::first-letter 伪元素 | 1 |
| E::before | 在 E 元素之前生成的内容 | ::before 伪元素 | 2 |
| E::after | 在一个 E 元素之后生成的内容 | ::after 伪元素 | 2 |
| E.warning | 一个 E 元素,它的类是 "warning"(文档语言指定类是如何确定的) | 类选择器 | 1 |
| E#myid | 一个 E 元素,ID 等于 "myid" | ID 选择器 | 1 |
| E:not(s) | 一个 E 元素,不符合简单选择器 s | 否定伪类 | 3 |
| E F | 一个 E 元素的 F 元素的后代元素 | 后代元素组合符 | 1 |
| E > F | 一个 E 元素的 F 元素的子元素 | 子元素组合符 | 2 |
| E + F | 一个 F 元素紧挨着一个 E 元素的后置元素 | 下一个下一个兄弟元素组合符 | 2 |
| E ~ F | 一个 F 元素前面有一个 E 元素 | 后续兄弟元素组合符 | 3 |

Expected behavior

Following is same table markdown content rendered in Markdown previewed enhanced.

image

Actual behavior

I use react markdown with remark-gfm in my blog project (http://www.trigold.tech/reading/chapters/61fb832c8d6e8a5f5120d110) to render the table markdown content.

Following is the code:

image

But I got this:

image

Runtime

No response

Package manager

npm

OS

windows 11 21H2, Chrome v97.0.4692.99

Build and bundle tools

create-react-app

TypeError: Cannot read property '3' of undefined

Initial checklist

Affected packages and versions

2.0.0

Link to runnable example

No response

Steps to reproduce

Here my code

import React from "react";
import Markdown from "react-markdown";

import gfm from "remark-gfm";
import raw from "rehype-raw";

const markdownSource = <span style="background: green">working example</span>;

export default function App() {
return (

{markdownSource}

);
}

Expected behavior

Package/plugin loaded without error

Actual behavior

Got error TypeError: Cannot read property '3' of undefined

image

Runtime

Node v16

Package manager

npm v7

OS

Windows

Build and bundle tools

Next.js

Markdown [https://www.twilio.com/](https://www.twilio.com/) links are not rendered as expected

Subject of the issue

Let's say we have the following markdown.

Go to [https://www.twilio.com/](https://www.twilio.com/) and sign up.

[https://www.twilio.com/](https://www.twilio.com/) is rendered as [https://www.twilio.com/](https://www.twilio.com/) vs a https://www.twilio.com/ hyperlink with a https://www.twilio.com/ href.

Screen Shot 2021-01-31 at 6 37 35 PM

Your environment

  • OS: macOS Catalina 10.15.7
  • Packages: react-markdown and remark-gfm
  • Env: Node 14.15.1 and npm 6.14.11

Steps to reproduce

This should be pretty straightforward to reproduce using above markdown.

Expected behavior

[https://www.twilio.com/](https://www.twilio.com/) should be rendered as https://www.twilio.com/ hyperlink with a https://www.twilio.com/ href.

Actual behavior

[https://www.twilio.com/](https://www.twilio.com/) is rendered as [https://www.twilio.com/](https://www.twilio.com/).

Lazy blockquote is rendered as codeblock instead blockquote

Subject of the issue

Lazy blockquote is not rendered correctly in remark-gfm

Your environment

  • OS: windows 10
  • Packages: remark-gfm-1.0.0
  • Env: node-v11.15.0

Steps to reproduce

Add a blockquote text followed by a lazy blockquote text. Without using remark-gfm, it is working as expected but when remark-gfm is used, it is rendering incorrectly

Sample Application: https://codesandbox.io/s/remark-rehype-debug-forked-w83b8?file=/src/index.js

Expected behavior

Lazy blockquote should also be rendered as blockquote

image

Actual behavior

Lazy blockquote should also be rendered as codeblock

image

False positive warnings

Subject of the issue

I have wrong warnings.

Your environment

  • OS: doesn't matter, for example Arch Linux
  • Packages: check in the PR
  • Env: latest, for example Node.js 15.6.0 and npm 6.14.11.

Steps to reproduce

Faced with it here: AlexWayfer/sequel-enum_values#56

  1. There are no such issues in actual Code of Conduct file.
  2. I couldn't reproduce the issue locally even with rm -r node_modules/, but I can with rm package-lock.json.

The difference is:

> diff package-lock.json package-lock.json.bak                                                                       26 Jan 22:00:44 
6,8c6,8
< 			"version": "7.12.11",
< 			"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz",
< 			"integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==",
---
> 			"version": "7.10.4",
> 			"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz",
> 			"integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==",
15,17c15,17
< 			"version": "7.12.11",
< 			"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz",
< 			"integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==",
---
> 			"version": "7.10.4",
> 			"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz",
> 			"integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==",
145,147c145,147
< 			"version": "2.2.0",
< 			"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
< 			"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
---
> 			"version": "2.1.0",
> 			"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz",
> 			"integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==",
210,212c210,212
< 			"version": "3.5.1",
< 			"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz",
< 			"integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==",
---
> 			"version": "3.4.3",
> 			"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.3.tgz",
> 			"integrity": "sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ==",
217c217
< 				"fsevents": "~2.3.1",
---
> 				"fsevents": "~2.1.2",
271,273c271,273
< 			"version": "4.3.1",
< 			"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
< 			"integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
---
> 			"version": "4.2.0",
> 			"resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz",
> 			"integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==",
367,369c367,369
< 			"version": "2.3.1",
< 			"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.1.tgz",
< 			"integrity": "sha512-YR47Eg4hChJGAB1O3yEAOkGO+rlzutoICGqGo9EZ4lKWokzZRSyIW1QmTzqjtw8MJdj9srP869CuWw/hyzSiBw==",
---
> 			"version": "2.1.3",
> 			"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz",
> 			"integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==",
425,427c425,427
< 			"version": "1.3.8",
< 			"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
< 			"integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
---
> 			"version": "1.3.5",
> 			"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
> 			"integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==",
462,464c462,464
< 			"version": "2.0.5",
< 			"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz",
< 			"integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==",
---
> 			"version": "2.0.4",
> 			"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz",
> 			"integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==",
525,527c525,527
< 			"version": "3.14.1",
< 			"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
< 			"integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
---
> 			"version": "3.14.0",
> 			"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz",
> 			"integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==",
614,616c614,616
< 			"version": "0.8.4",
< 			"resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-0.8.4.tgz",
< 			"integrity": "sha512-jj891B5pV2r63n2kBTFh8cRI2uR9LQHsXG1zSDqfhXkIlDzrTcIlbB5+5aaYEkl8vOPIOPLf8VT7Ere1wWTMdw==",
---
> 			"version": "0.8.1",
> 			"resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-0.8.1.tgz",
> 			"integrity": "sha512-qJXNcFcuCSPqUF0Tb0uYcFDIq67qwB3sxo9RPdf9vG8T90ViKnksFqdB/Coq2a7sTnxL/Ify2y7aIQXDkQFH0w==",
620,623c620,622
< 				"mdast-util-to-string": "^2.0.0",
< 				"micromark": "~2.11.0",
< 				"parse-entities": "^2.0.0",
< 				"unist-util-stringify-position": "^2.0.0"
---
> 				"mdast-util-to-string": "^1.0.0",
> 				"micromark": "~2.10.0",
> 				"parse-entities": "^2.0.0"
627,629c626,628
< 			"version": "0.1.1",
< 			"resolved": "https://registry.npmjs.org/mdast-util-gfm/-/mdast-util-gfm-0.1.1.tgz",
< 			"integrity": "sha512-oE1W1zSXU2L2LHg91V22HC3Z1fbsOZTBYUQq+kpM29f9297TbRm0C1l3bQ88RREl0WaUQaB49G7trvwy5utUKQ==",
---
> 			"version": "0.1.0",
> 			"resolved": "https://registry.npmjs.org/mdast-util-gfm/-/mdast-util-gfm-0.1.0.tgz",
> 			"integrity": "sha512-HLfygQL6HdhJhFbLta4Ki9hClrzyAxRjyRvpm5caN65QZL+NyHPmqFlnF9vm1Rn58JT2+AbLwNcEDY4MEvkk8Q==",
635,636c634
< 				"mdast-util-gfm-task-list-item": "^0.1.0",
< 				"mdast-util-to-markdown": "^0.6.1"
---
> 				"mdast-util-gfm-task-list-item": "^0.1.0"
640,642c638,640
< 			"version": "0.1.2",
< 			"resolved": "https://registry.npmjs.org/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-0.1.2.tgz",
< 			"integrity": "sha512-WFeIrcNNsfBety0gyWuiBIPing9UkVcl/m2iZOyW1uHEH2evjFocet2h77M24ub0WyZ4ucnQn/jWhO5Ozl6j4g==",
---
> 			"version": "0.1.1",
> 			"resolved": "https://registry.npmjs.org/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-0.1.1.tgz",
> 			"integrity": "sha512-gJ2xSpqKCetSr22GEWpZH3f5ffb4pPn/72m4piY0v7T/S+O7n7rw+sfoPLhb2b4O7WdnERoYdALRcmD68FMtlw==",
646,648c644,646
< 			"version": "0.2.3",
< 			"resolved": "https://registry.npmjs.org/mdast-util-gfm-strikethrough/-/mdast-util-gfm-strikethrough-0.2.3.tgz",
< 			"integrity": "sha512-5OQLXpt6qdbttcDG/UxYY7Yjj3e8P7X16LzvpX8pIQPYJ/C2Z1qFGMmcw+1PZMUM3Z8wt8NRfYTvCni93mgsgA==",
---
> 			"version": "0.2.2",
> 			"resolved": "https://registry.npmjs.org/mdast-util-gfm-strikethrough/-/mdast-util-gfm-strikethrough-0.2.2.tgz",
> 			"integrity": "sha512-T37ZbaokJcRbHROXmoVAieWnesPD5N21tv2ifYzaGRLbkh1gknItUGhZzHefUn5Zc/eaO/iTDSAFOBrn/E8kWw==",
651c649
< 				"mdast-util-to-markdown": "^0.6.0"
---
> 				"mdast-util-to-markdown": "^0.5.0"
655,657c653,655
< 			"version": "0.1.6",
< 			"resolved": "https://registry.npmjs.org/mdast-util-gfm-table/-/mdast-util-gfm-table-0.1.6.tgz",
< 			"integrity": "sha512-j4yDxQ66AJSBwGkbpFEp9uG/LS1tZV3P33fN1gkyRB2LoRL+RR3f76m0HPHaby6F4Z5xr9Fv1URmATlRRUIpRQ==",
---
> 			"version": "0.1.4",
> 			"resolved": "https://registry.npmjs.org/mdast-util-gfm-table/-/mdast-util-gfm-table-0.1.4.tgz",
> 			"integrity": "sha512-T4xFSON9kUb/IpYA5N+KGWcsdGczAvILvKiXQwUGind6V9fvjPCR9yhZnIeaLdBWXaz3m/Gq77ZtuLMjtFR4IQ==",
661c659
< 				"mdast-util-to-markdown": "~0.6.0"
---
> 				"mdast-util-to-markdown": "^0.5.0"
665,667c663,665
< 			"version": "0.1.6",
< 			"resolved": "https://registry.npmjs.org/mdast-util-gfm-task-list-item/-/mdast-util-gfm-task-list-item-0.1.6.tgz",
< 			"integrity": "sha512-/d51FFIfPsSmCIRNp7E6pozM9z1GYPIkSy1urQ8s/o4TC22BZ7DqfHFWiqBD23bc7J3vV1Fc9O4QIHBlfuit8A==",
---
> 			"version": "0.1.4",
> 			"resolved": "https://registry.npmjs.org/mdast-util-gfm-task-list-item/-/mdast-util-gfm-task-list-item-0.1.4.tgz",
> 			"integrity": "sha512-AMiHyBHvaYN2p3ztFv7gDgTF7keZDaA9plTixRXWT0aqL0QdN43QaG5+hzcRNbjCsEWBxWhpcNk1Diq0TiIEvw==",
670c668
< 				"mdast-util-to-markdown": "~0.6.0"
---
> 				"mdast-util-to-markdown": "^0.5.0"
680,682c678,680
< 			"version": "0.6.2",
< 			"resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-0.6.2.tgz",
< 			"integrity": "sha512-iRczns6WMvu0hUw02LXsPDJshBIwtUPbvHBWo19IQeU0YqmzlA8Pd30U8V7uiI0VPkxzS7A/NXBXH6u+HS87Zg==",
---
> 			"version": "0.5.3",
> 			"resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-0.5.3.tgz",
> 			"integrity": "sha512-sr8q7fQJ1xoCqZSXW6dO/MYu2Md+a4Hfk9uO+XHCfiBhVM0EgWtfAV7BuN+ff6otUeu2xDyt1o7vhZGwOG3+BA==",
687c685
< 				"mdast-util-to-string": "^2.0.0",
---
> 				"mdast-util-to-string": "^1.0.0",
694,696c692,694
< 			"version": "2.0.0",
< 			"resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz",
< 			"integrity": "sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==",
---
> 			"version": "1.1.0",
> 			"resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-1.1.0.tgz",
> 			"integrity": "sha512-jVU0Nr2B9X3MU4tSK7JP1CMkSvOj7X5l/GboG1tKRw52lLF1x2Ju92Ms9tNetCcbfX3hzlM73zYo2NKkWSfF/A==",
700,702c698,700
< 			"version": "2.11.2",
< 			"resolved": "https://registry.npmjs.org/micromark/-/micromark-2.11.2.tgz",
< 			"integrity": "sha512-IXuP76p2uj8uMg4FQc1cRE7lPCLsfAXuEfdjtdO55VRiFO1asrCSQ5g43NmPqFtRwzEnEhafRVzn2jg0UiKArQ==",
---
> 			"version": "2.10.1",
> 			"resolved": "https://registry.npmjs.org/micromark/-/micromark-2.10.1.tgz",
> 			"integrity": "sha512-fUuVF8sC1X7wsCS29SYQ2ZfIZYbTymp0EYr6sab3idFjigFFjGa5UwoniPlV9tAgntjuapW1t9U+S0yDYeGKHQ==",
710,712c708,710
< 			"version": "0.3.2",
< 			"resolved": "https://registry.npmjs.org/micromark-extension-gfm/-/micromark-extension-gfm-0.3.2.tgz",
< 			"integrity": "sha512-ToQEpLkRgg7Tp8D3GM/SjZFPV0cCwWNxZmoEVIOQivOswRtPg7gg2WlCrtHhUWFNX+DgDjbq0iLOPGp4Y15oug==",
---
> 			"version": "0.3.1",
> 			"resolved": "https://registry.npmjs.org/micromark-extension-gfm/-/micromark-extension-gfm-0.3.1.tgz",
> 			"integrity": "sha512-lJlhcOqzoJdjQg+LMumVHdUQ61LjtqGdmZtrAdfvatRUnJTqZlRwXXHdLQgNDYlFw4mycZ4NSTKlya5QcQXl1A==",
715c713
< 				"micromark": "~2.11.0",
---
> 				"micromark": "~2.10.0",
724,726c722,724
< 			"version": "0.5.5",
< 			"resolved": "https://registry.npmjs.org/micromark-extension-gfm-autolink-literal/-/micromark-extension-gfm-autolink-literal-0.5.5.tgz",
< 			"integrity": "sha512-UBK5/7efGCyfNW3bGAOIB0zaMfclhXi7/f4JPJkLCBgoksPJJs2UeX/uk2FS7H/cbnGd7L7X0CbNkH6ceK82Ww==",
---
> 			"version": "0.5.1",
> 			"resolved": "https://registry.npmjs.org/micromark-extension-gfm-autolink-literal/-/micromark-extension-gfm-autolink-literal-0.5.1.tgz",
> 			"integrity": "sha512-j30923tDp0faCNDjwqe4cMi+slegbGfc3VEAExEU8d54Q/F6pR6YxCVH+6xV0ItRoj3lCn1XkUWcy6FC3S9BOw==",
729c727
< 				"micromark": "~2.11.0"
---
> 				"micromark": "~2.10.0"
733,735c731,733
< 			"version": "0.6.3",
< 			"resolved": "https://registry.npmjs.org/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-0.6.3.tgz",
< 			"integrity": "sha512-MKMoP9x2dsr1aeX46ibBwVf4Q6nJsi5aaUFTOMOID5VOLSxwl4CrqUV4OGFQd6AqhtzBJAxaV+N2trlTBtZDNQ==",
---
> 			"version": "0.6.2",
> 			"resolved": "https://registry.npmjs.org/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-0.6.2.tgz",
> 			"integrity": "sha512-aehEEqtTn3JekJNwZZxa7ZJVfzmuaWp4ew6x6sl3VAKIwdDZdqYeYSQIrNKwNgH7hX0g56fAwnSDLusJggjlCQ==",
738c736
< 				"micromark": "~2.11.0"
---
> 				"micromark": "~2.10.0"
742,744c740,742
< 			"version": "0.4.2",
< 			"resolved": "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-0.4.2.tgz",
< 			"integrity": "sha512-AAzmj85XO1ydHYX0Lz52HGhcH2sZLm2AVvkwzELXWgZF6vGdq5yZ3CTByFRsqNUPyQBSIYFKLDAtc6KlnO42aw==",
---
> 			"version": "0.4.1",
> 			"resolved": "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-0.4.1.tgz",
> 			"integrity": "sha512-xVpqOnfFaa2OtC/Y7rlt4tdVFlUHdoLH3RXAZgb/KP3DDyKsAOx6BRS3UxiiyvmD/p2l6VUpD4bMIniuP4o4JA==",
747c745
< 				"micromark": "~2.11.0"
---
> 				"micromark": "~2.10.0"
757,763c755,758
< 			"version": "0.3.3",
< 			"resolved": "https://registry.npmjs.org/micromark-extension-gfm-task-list-item/-/micromark-extension-gfm-task-list-item-0.3.3.tgz",
< 			"integrity": "sha512-0zvM5iSLKrc/NQl84pZSjGo66aTGd57C1idmlWmE87lkMcXrTxg1uXa/nXomxJytoje9trP0NDLvw4bZ/Z/XCQ==",
< 			"dev": true,
< 			"requires": {
< 				"micromark": "~2.11.0"
< 			}
---
> 			"version": "0.3.1",
> 			"resolved": "https://registry.npmjs.org/micromark-extension-gfm-task-list-item/-/micromark-extension-gfm-task-list-item-0.3.1.tgz",
> 			"integrity": "sha512-3ZiolwyLEF+t2KvGqKdBNEybiacQCsBgDx4PRZz/dttwo0PkcVKh7jpxc6UdHQuNMJ/YRUNuCSal0WuoAlefAA==",
> 			"dev": true
840,842c835,837
< 			"version": "5.2.0",
< 			"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
< 			"integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
---
> 			"version": "5.1.0",
> 			"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.1.0.tgz",
> 			"integrity": "sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ==",
993,1000d987
< 			},
< 			"dependencies": {
< 				"mdast-util-to-string": {
< 					"version": "1.1.0",
< 					"resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-1.1.0.tgz",
< 					"integrity": "sha512-jVU0Nr2B9X3MU4tSK7JP1CMkSvOj7X5l/GboG1tKRw52lLF1x2Ju92Ms9tNetCcbfX3hzlM73zYo2NKkWSfF/A==",
< 					"dev": true
< 				}
1053,1060d1039
< 			},
< 			"dependencies": {
< 				"mdast-util-to-string": {
< 					"version": "1.1.0",
< 					"resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-1.1.0.tgz",
< 					"integrity": "sha512-jVU0Nr2B9X3MU4tSK7JP1CMkSvOj7X5l/GboG1tKRw52lLF1x2Ju92Ms9tNetCcbfX3hzlM73zYo2NKkWSfF/A==",
< 					"dev": true
< 				}
1074,1081d1052
< 			},
< 			"dependencies": {
< 				"mdast-util-to-string": {
< 					"version": "1.1.0",
< 					"resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-1.1.0.tgz",
< 					"integrity": "sha512-jVU0Nr2B9X3MU4tSK7JP1CMkSvOj7X5l/GboG1tKRw52lLF1x2Ju92Ms9tNetCcbfX3hzlM73zYo2NKkWSfF/A==",
< 					"dev": true
< 				}
1187,1189c1158,1160
< 			"version": "9.0.1",
< 			"resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-9.0.1.tgz",
< 			"integrity": "sha512-mWmNg3ZtESvZS8fv5PTvaPckdL4iNlCHTt8/e/8oN08nArHRHjNZMKzA/YW3+p7/lYqIw4nx1XsjCBo/AxNChg==",
---
> 			"version": "9.0.0",
> 			"resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-9.0.0.tgz",
> 			"integrity": "sha512-8x29DpTbVzEc6Dwb90qhxCtbZ6hmj3BxWWDpMhA+1WM4dOEGH5U5/GFe3Be5Hns5MvPSFAr1e2KSVtKZkK5nUw==",
1192c1163
< 				"mdast-util-to-markdown": "^0.6.0"
---
> 				"mdast-util-to-markdown": "^0.5.0"
1200a1172,1177
> 		"replace-ext": {
> 			"version": "1.0.0",
> 			"resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz",
> 			"integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=",
> 			"dev": true
> 		},
1365,1367c1342,1344
< 			"version": "3.0.2",
< 			"resolved": "https://registry.npmjs.org/unified-message-control/-/unified-message-control-3.0.2.tgz",
< 			"integrity": "sha512-lhF8fKjDo2cIPx1re5X1QinqUonl+AN6F0XfEaab8w/hjqX7FZAhzu4P8g6pmYp09ld+HSWFwdRJj+Y8xD0q7Q==",
---
> 			"version": "3.0.1",
> 			"resolved": "https://registry.npmjs.org/unified-message-control/-/unified-message-control-3.0.1.tgz",
> 			"integrity": "sha512-K2Kvvp1DBzeuxYLLsumZh/gDWUTl4e2z/P3VReFirC78cfHKtQifbhnfRrSBtKtd1Uc6cvYTW0/SZIUaMAEcTg==",
1375,1377c1352,1354
< 			"version": "1.1.6",
< 			"resolved": "https://registry.npmjs.org/unist-util-generated/-/unist-util-generated-1.1.6.tgz",
< 			"integrity": "sha512-cln2Mm1/CZzN5ttGK7vkoGw+RZ8VcUH6BtGbq98DDtRGquAAOXig1mrBQYelOwMXYS8rK+vZDyyojSjp7JX+Lg==",
---
> 			"version": "1.1.5",
> 			"resolved": "https://registry.npmjs.org/unist-util-generated/-/unist-util-generated-1.1.5.tgz",
> 			"integrity": "sha512-1TC+NxQa4N9pNdayCYA1EGUOCAO0Le3fVp7Jzns6lnua/mYgwHo0tz5WUAfrdpNch1RZLHc61VZ1SDgrtNXLSw==",
1390,1392c1367,1369
< 			"version": "4.0.4",
< 			"resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.4.tgz",
< 			"integrity": "sha512-3dF39j/u423v4BBQrk1AQ2Ve1FxY5W3JKwXxVFzBODQ6WEvccguhgp802qQLKSnxPODE6WuRZtV+ohlUg4meBA==",
---
> 			"version": "4.0.2",
> 			"resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz",
> 			"integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==",
1438,1440c1415,1417
< 			"version": "4.2.1",
< 			"resolved": "https://registry.npmjs.org/vfile/-/vfile-4.2.1.tgz",
< 			"integrity": "sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA==",
---
> 			"version": "4.2.0",
> 			"resolved": "https://registry.npmjs.org/vfile/-/vfile-4.2.0.tgz",
> 			"integrity": "sha512-a/alcwCvtuc8OX92rqqo7PflxiCgXRFjdyoGVuYV+qbgCb0GgZJRvIgCD4+U/Kl1yhaRsaTwksF88xbPyGsgpw==",
1444a1422
> 				"replace-ext": "1.0.0",
1450,1452c1428,1430
< 			"version": "3.2.0",
< 			"resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-3.2.0.tgz",
< 			"integrity": "sha512-aLEIZKv/oxuCDZ8lkJGhuhztf/BW4M+iHdCwglA/eWc+vtuRFJj8EtgceYFX4LRjOhCAAiNHsKGssC6onJ+jbA==",
---
> 			"version": "3.1.0",
> 			"resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-3.1.0.tgz",
> 			"integrity": "sha512-FCZ4AN9xMcjFIG1oGmZKo61PjwJHRVA+0/tPUP2ul4uIwjGGndIxavEMRpWn5p4xwm/ZsdXp9YNygf1ZyE4x8g==",
1466,1468c1444,1446
< 			"version": "6.0.2",
< 			"resolved": "https://registry.npmjs.org/vfile-reporter/-/vfile-reporter-6.0.2.tgz",
< 			"integrity": "sha512-GN2bH2gs4eLnw/4jPSgfBjo+XCuvnX9elHICJZjVD4+NM0nsUrMTvdjGY5Sc/XG69XVTgLwj7hknQVc6M9FukA==",
---
> 			"version": "6.0.1",
> 			"resolved": "https://registry.npmjs.org/vfile-reporter/-/vfile-reporter-6.0.1.tgz",
> 			"integrity": "sha512-0OppK9mo8G2XUpv+hIKLVSDsoxJrXnOy73+vIm0jQUOUFYRduqpFHX+QqAQfvRHyX9B0UFiRuNJnBOjQCIsw1g==",

Expected behavior

No warnings for a file without offenses.

Actual behavior

Warnings somewhy, with the same versions of remark and remark-gfm, as I see, but, I guess, with different indirect dependencies versions.

I report here, in remark-gfm, because there are warning only from it and it has its own dependencies.

Footnotes and Checklists not working with string from server

Initial checklist

Affected packages and versions

^3.0.1

Link to runnable example

Code sandbox

Steps to reproduce

I recently migrated my next.js app from reading directly from mdx files to using hashicorp's next-mdx-remote. Since then my content has been coming from my backend. And since then footnotes and checklists have been broken. I suspect this has to do with how javascript formats a string when sending it.

For example: This string works as desired when i use it directly

`- [x] You can also help us with documentation and tutorials. Here is how you can
      contribute by writing

- [x] Share with your friends and spread the word.`

However when I send it through a server it becomes like this:

"*   \\[x] You can also help us with documentation and tutorials. Here is how you can\n    contribute by writing\n    [documentation](https://docs.mindsdb.com/contribute/docs/) and\n    [tutorials](https://docs.mindsdb.com/sql/tutorials/home-rentals/). Don't\n    forget to follow the [style guide](https://docs.mindsdb.com/docs-rules/).\n\n*   \\[x] Share with your friends and spread the word about MindsDB.

I've tried a hack approach of content.replace(/\* \\\\\[x]/g, "* [x]") but this isn't working for me.

Expected behavior

A checkbox:
image

Actual behavior

Checkbox does not get rendered:
image

Runtime

Node v17

Package manager

npm 8

OS

macOS

Build and bundle tools

Next.js

Some `text` node has not `position` property

Subject of the issue

When parsing some text, the text node has not position property.

Your environment

  • OS: macOs 10.15.7
  • Packages:
    "remark-gfm": "^1.0.0",
    "remark-parse": "^9.0.0",
    "unified": "^9.2.1"

Env:

Node: 14.16.1 - ~/.volta/tools/image/node/14.16.1/bin/node
Yarn: 1.22.10 - ~/.volta/tools/image/yarn/1.22.10/bin/yarn
npm: 6.14.12 - ~/.volta/tools/image/node/14.16.1/bin/npm

Steps to reproduce

Reproducing repo: https://github.com/azu/remark-gfm-no-position-bug

import unified from "unified";
import remarkGfm from "remark-gfm";
import remarkParse from "remark-parse";

const remark = unified().use(remarkParse).use(remarkGfm);
const ast = remark.parse(`http&#x3A;//user:password@host:port/path?key=value#fragment`);
console.log(JSON.stringify(ast, null, 4));

output:

{
    "type": "root",
    "children": [
        {
            "type": "paragraph",
            "children": [
                {
                    "type": "text",
                    "value": "http://user:password@host:port/path?key=value#fragment"
                }
            ],
            "position": {
                "start": {
                    "line": 1,
                    "column": 1,
                    "offset": 0
                },
                "end": {
                    "line": 1,
                    "column": 60,
                    "offset": 59
                }
            }
        }
    ],
    "position": {
        "start": {
            "line": 1,
            "column": 1,
            "offset": 0
        },
        "end": {
            "line": 1,
            "column": 60,
            "offset": 59
        }
    }
}

Expected behavior

The text node should have position property.

{
    "type": "root",
    "children": [
        {
            "type": "paragraph",
            "children": [
                {
                    "type": "text",
                    "value": "http://user:password@host:port/path?key=value#fragment",
                    "position": {
                        "start": {
                            "line": 1,
                            "column": 1,
                            "offset": 0
                        },
                        "end": {
                            "line": 1,
                            "column": 60,
                            "offset": 59
                        }
                    }
                }
            ],
            "position": {
                "start": {
                    "line": 1,
                    "column": 1,
                    "offset": 0
                },
                "end": {
                    "line": 1,
                    "column": 60,
                    "offset": 59
                }
            }
        }
    ],
    "position": {
        "start": {
            "line": 1,
            "column": 1,
            "offset": 0
        },
        "end": {
            "line": 1,
            "column": 60,
            "offset": 59
        }
    }
}

Actual behavior

The text node has not position property.

{
    "type": "root",
    "children": [
        {
            "type": "paragraph",
            "children": [
                {
                    "type": "text",
                    "value": "http://user:password@host:port/path?key=value#fragment"
                }
            ],
            "position": {
                "start": {
                    "line": 1,
                    "column": 1,
                    "offset": 0
                },
                "end": {
                    "line": 1,
                    "column": 60,
                    "offset": 59
                }
            }
        }
    ],
    "position": {
        "start": {
            "line": 1,
            "column": 1,
            "offset": 0
        },
        "end": {
            "line": 1,
            "column": 60,
            "offset": 59
        }
    }
}

Escaping + http:// is something wrong:
http&#x3A;//a

Bad performance with long strings with gfm plugin enabled on react-markdown

Initial checklist

Affected packages and versions

3.0.1

Link to runnable example

No response

Steps to reproduce

https://github.com/angel-git/remark-issue

Expected behavior

When enabling the plugin the render takes around 30 seconds

Actual behavior

It shouldn't take so many seconds to render:
image

When removing the plugin like:

 <Markdown remarkPlugins={[]}>{markdownSource}</Markdown>

it renders instantly

is there some setting or something i could do to make it faster?

thanks

Runtime

Node v16

Package manager

npm 8

OS

macOS

Build and bundle tools

Create React App

Ordered list is not rendered as expected using react-markdown and remark-gfm plugin

Subject of the issue

I have users who want to render some content in an ordered list. The content looks good in Github, but when I render it with react-markdown using the remark-gfm plugin, it gets rendered wrong and the whole list is not looking as expected.

Your environment

  • Packages: react-markdown (version 5)

Steps to reproduce

Example in codesandbox.io:
https://codesandbox.io/s/react-markdown-forked-v6iy7?file=/src/App.js

Expected behavior

Should render the ordered list exactly like in Github:

1. some text
some link
2. Number two

Actual behavior

image

Performance issue with table

Initial checklist

Affected packages and versions

[email protected]

Link to runnable example

No response

Steps to reproduce

Save the following code as test-remark-gfm.mjs

and run node test-remark-gfm.mjs

import { remark } from 'remark';
import remarkGfm from 'remark-gfm';

const bigTable1 = String.raw`# Big Table 1

| Key  | Value           |
| ---- | --------------- |
| k1   | v1              |
| k2   | v2              |
| k3   | v3              |
| k4   | v4              |
| k5   | v5              |
| k6   | v6              |
| k7   | v7              |
| k8   | v8              |
| k9   | v9              |
| k10  | v10             |
| k1   | v1              |
| k2   | v2              |
| k3   | v3              |
| k4   | v4              |
| k5   | v5              |
| k6   | v6              |
| k7   | v7              |
| k8   | v8              |
| k9   | v9              |
| k10  | v10             |
| k1   | v1              |
| k2   | v2              |
| k3   | v3              |
| k4   | v4              |
| k5   | v5              |
| k6   | v6              |
| k7   | v7              |
| k8   | v8              |
| k9   | v9              |
| k10  | v10             |
| k1   | v1              |
| k2   | v2              |
| k3   | v3              |
| k4   | v4              |
| k5   | v5              |
| k6   | v6              |
| k7   | v7              |
| k8   | v8              |
| k9   | v9              |
| k10  | v10             |
| k1   | v1              |
| k2   | v2              |
| k3   | v3              |
| k4   | v4              |
| k5   | v5              |
| k6   | v6              |
| k7   | v7              |
| k8   | v8              |
| k9   | v9              |
| k10  | v10             |

`;


const bigTable2 = String.raw`# Big Table 2

| Key  | Value           |
| ---- | --------------- |
| k1   | v1              |
| k2   | v2              |
| k3   | v3              |
| k4   | v4              |
| k5   | v5              |
| k6   | v6              |
| k7   | v7              |
| k8   | v8              |
| k9   | v9              |
| k10  | v10             |
| ---- | --------------- |
| k1   | v1              |
| k2   | v2              |
| k3   | v3              |
| k4   | v4              |
| k5   | v5              |
| k6   | v6              |
| k7   | v7              |
| k8   | v8              |
| k9   | v9              |
| k10  | v10             |
| ---- | --------------- |
| k1   | v1              |
| k2   | v2              |
| k3   | v3              |
| k4   | v4              |
| k5   | v5              |
| k6   | v6              |
| k7   | v7              |
| k8   | v8              |
| k9   | v9              |
| k10  | v10             |
| ---- | --------------- |
| k1   | v1              |
| k2   | v2              |
| k3   | v3              |
| k4   | v4              |
| k5   | v5              |
| k6   | v6              |
| k7   | v7              |
| k8   | v8              |
| k9   | v9              |
| k10  | v10             |
| ---- | --------------- |
| k1   | v1              |
| k2   | v2              |
| k3   | v3              |
| k4   | v4              |
| k5   | v5              |
| k6   | v6              |
| k7   | v7              |
| k8   | v8              |
| k9   | v9              |
| k10  | v10             |

`;


main();

async function main() {
  console.time('bigTable1 w/o gfm');
  await remark()
    .process(bigTable1);
  console.timeEnd('bigTable1 w/o gfm');

  console.time('bigTable1 w/  gfm');
  await remark()
    .use(remarkGfm)
    .process(bigTable1);
  console.timeEnd('bigTable1 w/  gfm');

  console.time('bigTable2 w/o gfm');
  await remark()
    .process(bigTable2);
  console.timeEnd('bigTable2 w/o gfm');

  console.time('bigTable2 w/  gfm');
  await remark()
    .use(remarkGfm)
    .process(bigTable2);
  console.timeEnd('bigTable2 w/  gfm');

}

Expected behavior

The "with gfm" situation is fast enough to process against "without gfm".

Actual behavior

Here are the results of the 3 tests.

$ node test-remark-gfm.mjs
bigTable1 w/o gfm: 10.063ms
bigTable1 w/  gfm: 54.546ms
bigTable2 w/o gfm: 2.872ms
bigTable2 w/  gfm: 9.518s

$ node test-remark-gfm.mjs
bigTable1 w/o gfm: 9.001ms
bigTable1 w/  gfm: 48.596ms
bigTable2 w/o gfm: 2.226ms
bigTable2 w/  gfm: 9.196s

$ node test-remark-gfm.mjs
bigTable1 w/o gfm: 8.827ms
bigTable1 w/  gfm: 53.679ms
bigTable2 w/o gfm: 2.773ms
bigTable2 w/  gfm: 10.153s

Runtime

Node v16

Package manager

npm 8, yarn 2

OS

Linux

Build and bundle tools

No response

Note

node: v16.17.1
npm: v8.15.0

With the bigTable2, it takes more time if you add | ---- | --------------- | rows into the table.

Even with the bigTable1, more rows take more time (although not as much as bigTable2).

Performance issue with remark-gfm

Subject of the issue

Encountered a performance issue with this GFM plugin

Your environment

  • OS: macOS
  • Packages:
    "remark": "13.0.0",
    "remark-gfm": "1.0.0"
  • Env: Node.js v14.15.1

Steps to reproduce

const remark = require("remark");
const gfm = require("remark-gfm");

const str = String.raw`"[Python编程量化AI全栈零基础入门](http://www.54gcshi.com/forum.php?mod=viewthread&tid=204)\n适用人群\n零基础想系统学习Python语言朋友,想了解爬虫自动化,全栈架构,金融量化,数据科学,人工智能的朋友\n\n\n课程概述本系列课程包括 零基础入门+高阶提高+实战运用+拓展篇\n\n1.【零基础入门】从最简单自带编辑器开始,淡化晦涩专业词汇,将基础分散成小例子,充分利用碎片时间学习\n2.【全栈架构师】前端,后端,服务器,数据库等全面介绍,用Python打通任督二脉,实战【Flask】【Django】等热门框架,上线商业网站\n3.【FinTech与量化交易】基础到实战: 不仅包括A股美股常规的自动交易,选股,择时,风控,回测系统搭建,更有宏观经济判断,行业投研,公司财务报表分析,建模与估值等全流程分析.并加入机器学习,自然语言处理等前沿技术助力\n4.【数据科学与机器学习】从零开始介绍数据科学常用方法与机器学习,从原理层面理解“黑箱”。进阶部分实战深度学习与Tensorflow等框架\n5.【选修AI视觉自动驾驶】结合AI与计算机视觉,搭建自动驾驶系统\n6.【Python高阶】系统的算法数据结构强化训练,世界500强面试经典题目讲解\n7.【有趣DIY】【爬虫】【操控ExcelWordPPT微信邮件】提升工作效率生活品质\n\n目录连载\n章节1:系统化2000+连载/逐行代码细致讲解/大量拓展试看\n课时1视频【11月购课福利】【额外赠电影剧情式Python入门连载第一季】02:41可试看\n课时2视频【试看】【附赠剧情Python连载】【第一季|第1集】【重返火星】04:23可试看\n课时3视频【试看】【附赠剧情Python连载】【第一季|第2集】【紧急任务】02:32可试看\n课时4视频【试看】【附赠剧情Python】【第一季|第2集】【平行宇宙Mac篇】02:32可试看\n课时5视频【试看】【附赠剧情Python】【第一季|第2集】【平行宇宙Win篇】06:22可试看\n课时6视频【试看】【附赠剧情Python】【第一季|第3集】【神秘信息】03:27可试看\n课时7视频【试看】【附赠剧情Python】【第一季|第4集】【飞翔火星】01:51可试看\n课时8视频【试看】【还有50+隐藏内容赠送-购课后联系小管家获取】02:30可试看\n课时9视频【试看】【6大领域更多精彩点击合集】【Python计算机视觉方向】02:32可试看\n课时10视频【试看】【6大领域更多精彩点击合集】【美好生活方向片段】00:45可试看\n课时11视频【试看】【6大领域更多精彩点击合集】【Python全栈方向片段】02:28可试看\n课时12视频【试看】【6大领域更多精彩点击合集】【Python进阶方向片段】00:49可试看\n课时13视频【试看】【更多实用内容可查看系列课程】之【美好生活】方向08:38可试看\n课时14视频【试看】【更多实用内容可查看系列课程】之【美好生活】方向06:16可试看\n课时15视频【试看】2020最新版系列课程各方向重点与使用工具介绍03:16可试看\n课时16视频【试看】2020最新版2000+系列课程正在连载更新01:54可试看\n课时17视频【试看】欢迎大家,一起进入编程的新世界吧15:17可试看\n课时18文本Python安装\n课时19文本技术探讨群与常见软件资料汇总(持续更新)\n课时20视频课程观看方法与建议06:43\n课时21文本【必读】环境搭建与讨论区常见问题精华汇总【持续更新ing】\n课时22视频【常见问题答疑与讨论区问题精选】1.PythonIDLE下载09:08\n课时23视频【常见问题答疑与讨论区问题精选】2.PythonIDLE安装17:25\n课时24视频【常见问题答疑与讨论区问题精选】3.Anaconda下载与清华镜像13:18\n课时25视频【常见问题答疑与讨论区问题精选】4.condaPIP与虚拟环境17:13\n课时26视频【常见问题答疑与讨论区问题精选】5.sublime与gitbash11:23\n课时27视频【常见问题答疑与讨论区问题精选】6.gitcommit跳转问题13:34\n章节2:【正式系统课程这里开始】算术运算符\n课时28视频算术运算符03:16\n课时29视频算术运算符练习:股票均价01:47\n章节3:变量和赋值运算符\n课时30视频变量和赋值运算符01:41\n课时31视频变量和赋值运算符易犯错误和小技巧.03:30\n课时32视频变量和赋值运算符易犯错误和小技巧205:23\n课时33视频变量和赋值运算符易犯错误和小技巧303:30\n课时34视频变量和赋值运算符答疑03:37\n章节4:整数和浮点数\n课时35视频整数和浮点数04:00\n课时36视频整数和浮点数解释02:45\n章节5:布尔型运算符、比较运算符、逻辑运算符\n课时37视频布尔型运算符、比较运算符、逻辑运算符03:41\n课时38视频布尔型运算符、比较运算符、逻辑运算符202:52\n章节6:字符串\n课时39视频字符串05:36\n课时40视频字符串206:48\n课时41视频字符串302:35\n课时42视频字符串练习:客户信息真实性判断09:20\n章节7:类型和类型转换\n课时43视频类型和类型转换06:53\n课时44视频类型和类型转换204:29\n章节8:字符串方法\n课时45视频字符串方法08:56\n课时46视频字符串方法201:41\n课时47视频字符串方法306:05\n章节9:列表\n课时48视频列表索引10:12\n课时49视频列表切片05:52\n课时50视频列表判断某个元素是否在列表04:08\n课时51视频列表和字符串的可变性06:56\n课时52视频列表和字符串的可变性206:15\n课时53视频列表和字符串的可变性306:59\n章节10:实用列表函数\n课时54视频实用列表函数08:56\n课时55视频列表方法join06:18\n课时56视频列表方法append03:47\n章节11:元组和元组解包\n课时57视频元组和元组解包05:59\n课时58视频元组和format介绍04:48\n章节12:集合\n课时59视频集合和列表去重05:03\n课时60视频集合add02:25\n课时61视频集合add()pop()02:00\n章节13:字典\n课时62视频字典03:49\n课时63视频字典get()03:00\n课时64视频字典及恒等运算符02:02\n课时65视频字典get()自定义返回值02:24\n课时66视频“=”,“==”,“is”辨析04:06\n章节14:复合数据结构\n课时67视频复合数据结构06:40\n章节15:数据类型和运算符总复习\n课时68视频数据类型和运算符总复习05:23\n课时69视频数据类型和运算符总复习202:25\n课时70视频数据类型和运算符总复习301:55\n章节16:控制流\n课时71视频控制流:条件语句110:08\n课时72视频控制流:条件语句204:16\n课时73视频控制流:条件语句3缩进02:50\n章节17:复杂的布尔表达式\n课时74视频复杂的布尔表达式06:45\n课时75视频复杂的布尔表达式203:02\n章节18:For循环\n课时76视频For循环06:10\n课时77视频For循环204:11\n章节19:range()函数\n课时78视频range()介绍03:09\n课时79视频range()生成列表02:53\n章节20:For循环和range()列表修改\n课时80视频For循环和range()列表修改03:21\n课时81视频For循环和range()列表修改202:06\n课时82视频For循环综合练习04:27\n章节21:字典迭代\n课时83视频字典迭代03:02\n课时84视频字典迭代203:40\n章节22:While循环\n课时85视频While循环06:11\n课时86视频While循环与break终止05:18\n课时87视频While循环与continue05:40\n章节23:Zip迭代器\n课时88视频Zip迭代器04:25\n课时89视频Zip迭代器和len()04:40\n课时90视频Zip迭代器和Enumerate()03:24\n课时91视频Zip迭代器zip()反向(勘误:4:40返回的为tuple)06:28\n课时92视频练习:购物信息整合Zip07:12\n课时93视频练习:将列表组合成字典02:57\n章节24:列表推导式\n课时94视频列表推导式08:33\n课时95视频列表推导式加条件语句10:17\n章节25:小补充split()\n课时96视频小补充split()02:24\n课时97视频小补充split()203:29\n课时98视频小补充split()有参数04:02\n课时99视频小补充split()有两个参数08:27\n章节26:练习\n课时100视频练习:客户列表中提取姓、名07:04\n课时101视频练习:信贷打分筛选简化运用07:36\n章节27:自定义函数\n课时102视频自定义函数.03:53\n课时103视频自定义函数组成部分06:34\n课时104视频自定义函数默认参数06:27\n课时105视频练习:贷款到期日拆分提醒08:55\n章节28:以自定义PE_ratio为例写文档\n课时106视频以自定义PE_ratio为例写文档11:18\n章节29:高阶内置函数\n课时107视频Lambda表达式介绍07:08\n课时108视频高阶内置函数filter()批量删选虚假姓名09:34\n课时109视频高阶内置函数map().04:57\n课时110视频高阶内置函数map()地区平均信用质量08:17\n课时111视频地区平均信用质量lambda简化03:17\n章节30:迭代器和生成器\n课时112视频迭代器和生成器04:36\n课时113视频迭代器和数据流对象07:02\n课时114视频生成器生成迭代器06:38\n课时115视频生成器生成迭代器05:33\n课时116视频自己编写enumerate()10:19\n课时117视频编写生成器对大数据进行拆分07:39\n章节31:安装python\n课时118视频安装python05:13\n课时119视频介绍anaconda06:23\n课时120视频编程环境对比03:10\n课时121视频input()作为桥梁05:11\n课时122视频错误和异常SyntaxError.04:17\n课时123视频错误和异常09:27\n课时124视频处理错误和异常09:02\n章节32:读取写入文件\n课时125视频读取文件11:01\n课时126视频写入文件08:26\n章节33:项目中导入\n课时127视频大型项目中导入本地脚本12:23\n课时128视频标准库03:15\n课时129视频导入标准库02:58\n章节34:Shell入门1\n课时130视频1.1shell是什么06:16\n课时131视频1.2window下的git安装03:37\n课时132视频1.3bash_shell与python_shell03:49\n章节35:Shell入门2\n课时133视频1.4echo_Hello_World.03:02\n课时134视频1.5ls,cd与cd..进行文件操作04:23\n课时135视频1.6bash_shell自定义05:59\n章节36:Shell入门3\n课时136视频1.7pwd和~05:17\n课时137视频1.8指定路径或者找到所有某一类型文件07:06\n课时138视频1.9创建文件及批量处理整理文件04:55\n章节37:Shell入门4\n课时139视频1.10curl打开网页和下载网页04:13\n课时140视频1.11两个小疑问回答02:39\n课时141视频1.12cat与less打开文件05:12\n章节38:Shell入门5\n课时142视频1.13tab小技巧和touch创建03:53\n课时143视频1.14rm和rmdir.05:02\n课时144视频1.15nano写入文件06:41\n章节39:Shell入门6\n课时145视频1.16grep和pipe命令07:19\n课时146视频1.17curl,wc与grep-c运用04:25\n课时147视频1.18总结,学无止境的Linux之路06:43\n章节40:【常用知识:git介绍】1\n课时148视频1.Linux_shell介绍08:21\n课时149视频2.Version_Control介绍08:21\n课时150视频3.在电脑上实现原始的版本控制02:22\n章节41:【常用知识:git介绍】2\n课时151视频4.利用diff进行本地比较04:40\n课时152视频5.配置Sublime_text03:32\n课时153视频6.本地建立Repository仓库07:16\n章节42:【常用知识:git介绍】3\n课时154视频7.本地版本修改并放到本地仓库09:10\n课时155视频8.本地版本git运用05:19\n课时156视频9.git官方文档及流程图06:13\n章节43:【常用知识:git介绍】4\n课时157视频10.工作区和暂存区对比05:51\n课时158视频11.暂存区git仓库对比04:05\n课时159视频12.通过git_reset进行大胆尝试09:10\n章节44:【常用知识:git介绍】5\n课时160视频13commit小技巧04:48\n课时161视频14.branching分支介绍04:00\n课时162视频15.branching分支切换03:56\n章节45:【常用知识:git介绍】6\n课时163视频16.branching合并的思考05:32\n课时164视频17.分支开发与合并11:46\n课时165视频18.自动合并有时会失灵11:50\n章节46:【常用知识:git介绍】7\n课时166视频19.解决冲突06:06\n课时167视频20成功合并总结git知识05:53\n课时168视频21.github创建push命令10:02\n章节47:【常用知识:git介绍】8\n课时169视频22.github上手动建立新文件06:02\n课时170视频23.将云端文件pull到本地03:08\n课时171视频24.将大神们的代码fork过来研究03:07\n课时172视频25.将大神们的代码clone到本地03:31\n章节48:【小项目:数据可视化】1\n课时173视频1.1matplotlib介绍安装及画线09:09\n课时174视频1.2x轴y轴与多数据legend运用11:49\n课时175视频1.3柱状图绘制12:50\n课时176视频答疑:【关于spyder可交互图的调整】02:26\n章节49:【小项目:数据可视化】2\n课时177视频1.4直方图绘制14:43\n课时178视频1.5散点图绘制09:45\n课时179视频1.6堆栈图绘制18:35\n章节50:【小项目:数据可视化】3\n课时180视频1.7饼状图绘制16:24\n课时181视频1.8导入csv数据15:00\n课时182视频1.9外部接口导入数据05:12\n章节51:【小项目:数据可视化】4\n课时183视频1.10对数据进行排序处理绘制08:01\n课时184视频1.11多个数据画图叠加07:53\n课时185视频1.12多个数据画图叠加204:36\n章节52:【小项目:数据可视化】5\n课时186视频1.13读取csv并导入07:42\n课时187视频1.14iloc定位单个数据05:49\n课时188视频1.15小实践:世界国家人口增长1(电脑网页版登录可以下载csv)08:27\n章节53:【小项目:数据可视化】6\n课时189视频1.16小实践:世界国家人口增长208:50\n课时190视频1.17小实践:世界国家人口增长303:13\n课时191视频1.18小实践:世界国家人口增长409:36\n章节54:Class介绍1\n课时192视频1.1class与object对比06:32\n课时193视频1.2class创建用户08:37\n课时194视频1.3class这个机器模子通上电02:13\n章节55:Class介绍2\n课时195视频1.4__init__和数据预处理08:58\n课时196视频1.5尝试init是否有用07:30\n课时197视频1.6自定义age函数13:17\n章节56:Class介绍3\n课时198视频1.7测试age函数和class02:34\n课时199视频1.8class里面help的编写06:12\n章节57:numpy,pandas等介绍1\n课时200视频1.1介绍三个库03:44\n课时201视频1.2创建numpy_array07:44\n课时202视频1.3array是什么05:19\n章节58:numpy,pandas等介绍2\n课时203视频1.4ndarray05:54\n课时204视频1.5ndarray的dty04:23\n课时205视频1.6dtype转换05:56\n课时206视频1.7.array的切分操作05:32\n课时207视频1.8a和b的关联关系02:13\n课时208视频1.9快速生成array方法07:30\n课时209视频1.10indexing的方法脱离关联07:15\n课时210视频1.11index运用和小技巧10:44\n课时211视频1.12布尔值贴标签05:59\n课时212视频1.13array加法03:38\n课时213视频1.14举一反三四则运04:01\n课时214视频1.15点乘余弦定理等推倒11:14\n课时215视频1.16点乘的空间意义04:25\n课时216视频1.17矩阵相乘简要介绍与dot06:42\n课时217视频1.18numpy里dot的运用举例06:44\n课时218视频1.19求和与转置介绍06:54\n课时219视频1.20broadcasting其实就是脑补06:12\n课时220视频1.21两个小用法和技巧05:23\n课时221视频1.22broadcast练习04:31\n课时222视频2.1pandas介绍与数据获取06:10\n课时223视频2.2下载数据与pandas读取数据05:48\n课时224视频2.3类比excel设置pandas11:44\n课时225视频2.4header的调整05:46\n课时226视频2.5index调整09:12\n课时227视频2.6批量输入及更改header.04:47\n课时228视频2.7dataframe和series06:53\n课时229视频2.8几个小技巧和注意事项09:47\n课时230视频2.9series相加07:14\n课时231视频2.10series放到dataframe里07:05\n课时232视频2.11问题解答:为什么有的有括号有的没括号07:57\n课时233视频2.12拿到数据后总体描述04:24\n章节59:【小项目:随机游走模拟】1试看\n课时234视频1.1Random_walk介绍05:17可试看\n课时235视频1.2Monte_Carlo_Method介绍04:36\n课时236视频1.3随机漫步在Python里实现05:24\n章节60:【小项目:随机游走模拟】2\n课时237视频1.4实现醉汉随机游走09:58\n课时238视频1.5分析代码进行改进提升12:25\n章节61:【小项目:蒙特卡洛模拟】1\n课时239视频1.1随机游走例子改进04:06\n课时240视频1.2蒙特卡洛模拟随机游走10:40\n课时241视频1.3代码改进05:43\n章节62:【小项目:蒙特卡洛模拟】2试看\n课时242视频2.1坐电梯的例子04:46可试看\n课时243视频2.2随机抽取数的函数08:11\n课时244视频2.3写一个fool的函数10:30\n章节63:【小项目:蒙特卡洛模拟】3\n课时245视频2.4画100个人生14:09\n课时246视频3.1等价殃介绍04:19\n课时247视频3.2等价殃框架搭建12:02\n章节64:【小项目:蒙特卡洛模拟】4\n课时248视频3.3上一轮赢的情况讨论(代码有更新详细完整代码见讨论区与勘误)08:31\n课时249视频3.4上一轮输的情况讨论(代码有更新详细完整代码见讨论区与勘误)08:18\n课时250视频3.5加入蒙特卡洛模拟(代码有更新详细完整代码见讨论区与勘误)04:47\n课时251视频3.6建模**和理性判断小结03:56\n章节65:正则表达式1\n课时252视频1正则表达式介绍03:53\n课时253视频2找到客户留言中的电话信息09:29\n课时254视频3找到所有的电话信息并放入列表03:00\n章节66:正则表达式2\n课时255视频4提取符合条件电话号码的国家代码03:31\n课时256视频5.提取带有括号的国家代码07:17\n课时257视频6.通过pipe找出你心中TA的名字08:34\n章节67:正则表达式3\n课时258视频7.可选的方法找海贼王05:37\n课时259视频8.零到多个相符方法找开心的人.05:32\n课时260视频9.{}确定重复次数及优化代码10:12\n章节68:正则表达式4\n课时261视频10.greedy和nongreedy的方法05:05\n课时262视频11.findall的方法找到联系方式05:57\n章节69:小项目:Wikipedia爬虫1\n课时263视频1.项目介绍03:14\n课时264视频2.网页与html.06:32\n课时265视频3.把网页导入Python04:36\n章节70:小项目:Wikipedia爬虫2\n课时266视频4.通过BeautifulSoup进行解析网页07:46\n课时267视频5.robots.txt与程序流程设计07:48\n课时268视频6.主循环与log14:36\n章节71:小项目:Wikipedia爬虫3\n课时269视频7.自定义爬虫函数11:15\n课时270视频8.自定义找到页面链接函数16:47\n章节72:【全栈入门系列】之【服务器基础】1\n课时271视频1.Unix的历史08:37\n课时272视频2.Linux的历史和各种发行版本介绍17:22\n课时273视频3.下载Linux系统及虚拟机06:13\n章节73:【全栈入门系列】之【服务器基础】2\n课时274视频4.创建虚拟机06:57\n课时275视频5.设置虚拟机参数03:19\n课时276视频6.别忘了插入光盘02:48\n章节74:【全栈入门系列】之【服务器基础】3\n课时277视频7.画面太小,scale一下02:35\n课时278视频8.Linux安装系统参数设置04:06\n课时279视频9.Linux安装系统参数设置202:44\n章节75:【全栈入门系列】之【服务器基础】4\n课时280视频10.CentOS及Linux桌面GUI版本熟悉.07:32\n课时281视频11.Linux运用最多的两个领域02:11\n课时282视频12.Linux嵌入式系统运用07:02\n章节76:【全栈入门系列】之【服务器基础】5\n课时283视频13.Linux服务器云计算方面的运用05:19\n课时284视频14.常见port端口及协议了04:51\n课时285视频【*勘误】PPT中为CUPS(Common_Unix_Printing_System)04:18\n章节77:【全栈入门系列】之【服务器基础】6\n课时286视频16.怎么从虚拟机里逃出来02:16\n课时287视频17.外貌协会的福音03:12\n课时288视频18.程序安装方法11:41\n章节78:【全栈入门系列】之【服务器基础】7\n课时289视频19.实战操作如何安装httpd07:54\n课时290视频20.如何删除httpd及repo位置07:43\n课时291视频21.各种terminal之间切换06:08\n章节79:【全栈入门系列】之【服务器基础】8\n课时292视频22.云计算与虚拟化知识补充02:52\n课时293视频23.ls显示的运用06:17\n课时294视频24.环境变量与PATH04:55\n章节80:【全栈入门系列】之【服务器基础】9\n课时295视频25.我是谁和如何切换用户04:12\n课时296视频26.如何实用关机命令03:26\n课时297视频27.top查看系统正在运行的程序02:47\n章节81:【全栈入门系列】之【服务器基础】10\n课时298视频28.uname显示系统与机器信息03:17\n课时299视频29.自由的在系统中穿梭02:36\n课时300视频30.linux在记录你的一举一动05:20\n章节82:【全栈入门系列】之【服务器基础】11\n课时301视频31.命令与变量05:32\n课时302视频32.变量导出05:55\n课时303视频33.实际例子增加opt02:55\n章节83:【全栈入门系列】之【服务器基础】12\n课时304视频34.忘记文件名怎么模糊查找03:55\n课时305视频35.单引号和双引号的区别03:17\n课时306视频36命令行语法规则06:10\n章节84:【全栈入门系列】之【服务器基础】13\n课时307视频37.系统中查找文件04:17\n课时308视频38.linux自带的说明书10:01\n课时309视频39.更强大的man,info03:05\n章节85:【全栈入门系列】之【服务器基础】14\n课时310视频40.常见的其他文档04:38\n课时311视频41.Linux文件管理系统介绍03:01\n课时312视频42.Linux文件管理系统实操03:59\n章节86:【全栈入门系列】之【服务器基础】15\n课时313视频43.绝对路径和相对路径03:36\n课时314视频44.让我们来创造东西吧07:39\n课时315视频45.cp感的拷贝文件03:46\n章节87:【全栈入门系列】之【服务器基础】16\n课时316视频46.mv移动和重命名02:35\n课时317视频47.rm永久删除一定要慎重03:39\n课时318视频48.rm全部文件04:04\n章节88:【全栈入门系列】之【服务器基础】17\n课时319视频49.tar打包文件05:55\n课时320视频50.tar解包操作及问题02:59\n课时321视频51.gz打包并压缩03:48\n章节89:【全栈入门系列】之【服务器基础】18\n课时322视频52.解压解包04:02\n课时323视频53.bzip2压缩和解压06:16\n课时324视频54.zip压缩和解压04:33\n章节90:【全栈入门系列】之【服务器基础】19\n课时325视频55.unzip,cat练习03:18\n课时326视频56.只读头部或者尾部04:03\n课时327视频57.tail监控用户登录03:37\n章节91:【全栈入门系列】之【服务器基础】20\n课时328视频58.符号导入值06:03\n课时329视频59.cut剪切文件05:03\n课时330视频60.sort排序02:50\n章节92:【全栈入门系列】之【服务器基础】21\n课时331视频61.echo与导入的结合03:15\n课时332视频62.文件wc导出03:10\n课时333视频63.正则表达式103:50\n章节93:【全栈入门系列】之【服务器基础】22\n课时334视频64.正则表达式202:03\n课时335视频65.正则表达式303:43\n课时336视频66.pipe命令和grep命令05:04\n章节94:【全栈入门系列】之【服务器基础】23\n课时337视频67.Vim简介02:57\n课时338视频68.Vim简介208:46\n课时339视频69.停一停,为什么我们Linux学这么深?04:44\n章节95:【全栈入门系列】之【服务器基础】24\n课时340视频70.把每天的日常编程07:24\n课时341视频71.程序执行权限04:50\n课时342视频72.组合技能一次执行05:25\n章节96:【全栈入门系列】之【服务器基础】25\n课时343视频73.逻辑判断变复杂04:36\n课时344视频74.自动汇总统计文件05:57\n课时345视频75.改进我们的代码07:08\n章节97:【全栈入门系列】之【服务器基础】26\n课时346视频76.硬件的介绍与学习必要性03:37\n课时347视频77.**处理器CPU介绍104:09\n课时348视频78.**处理器CPU介绍203:37\n章节98:【全栈入门系列】之【服务器基础】27\n课时349视频79.**处理器CPU介绍304:09\n课时350视频80.RAM介绍104:27\n课时351视频81.RAM介绍205:30\n章节99:【全栈入门系列】之【服务器基础】28\n课时352视频82.主板电源介绍07:23\n课时353视频83.硬盘介绍103:43\n课时354视频84.硬盘介绍203:32\n章节100:【全栈入门系列】之【服务器基础】29\n课时355视频85.硬盘介绍303:28\n课时356视频86.纵观全局看系统05:58\n课时357视频87.纵观全局看系统202:42\n章节101:【全栈入门系列】之【服务器基础】30\n课时358视频88.纵观全局看系统304:50\n课时359视频89.系统日志介绍05:04\n课时360视频90.网络基本介绍08:49\n章节102:【全栈入门系列】之【服务器基础】31\n课时361视频91.wheel组和权限05:31\n课时362视频92.新建用户组和用户04:45\n课时363视频93.新用户默认配置03:45\n章节103:【全栈入门系列】之【服务器基础】32\n课时364视频94.用户密码管理05:16\n课时365视频95.权限问题05:43\n课时366视频96.权限更改04:09\n章节104:【全栈入门系列】之【服务器基础】33\n课时367视频97.用户和用户组更改06:47\n课时368视频98.将文件链接到一起05:55\n课时369视频99.特殊文件和stickybit08:44\n章节105:【全栈入门系列】之【服务器基础】34试看\n课时370视频100.继续学习的道路推荐12:22\n课时371视频101.未来一起加油13:40可试看\n章节106:【全栈入门系列】之【介绍】1\n课时372视频1.全栈工程师介绍17:31\n课时373视频2.前端编写环境配置04:13\n课时374视频3.emmet生成html模板06:04\n章节107:【全栈入门系列】之【前端基础】1\n课时375视频4.加上段落span04:25\n课时376视频5.加上图片04:10\n课时377视频6.层级关系介绍05:21\n章节108:【全栈入门系列】之【前端基础】2\n课时378视频7.自学标签的方法05:53\n课时379视频8.路径和协议的概念02:35\n课时380视频9.通过超链接连接网页05:11\n章节109:【全栈入门系列】之【前端基础】3\n课时381视频10.利用表格与网页进行交互04:38\n课时382视频11.五花八门的表单输入方法08:33\n课时383视频12.贴上标签让用户清楚怎么输07:26\n章节110:【全栈入门系列】之【前端基础】4\n课时384视频13.加上按钮让用户提交07:41\n课时385视频14.html的head介绍04:00\n课时386视频15.Freestyle到有Style06:15\n章节111:【全栈入门系列】之【前端基础】5\n课时387视频16.记得注释哦05:28\n课时388视频17.相同标签的冲突问题04:29\n课时389视频18.通过id和class解决冲突08:29\n章节112:【全栈入门系列】之【前端基础】6\n课时390视频19.css_reference03:02\n课时391视频20.利用开发者工具将网页变丑03:41\n课时392视频21.CSS中的长度概念05:52\n章节113:【全栈入门系列】之【前端基础】7\n课时393视频22.利用w3school平台参考04:55\n课时394视频23.从三原色到rgb和hex05:01\n课时395视频24.stylesheet对网页进行批量修改06:09\n章节114:【全栈入门系列】之【http原理】1\n课时396视频【基础知识HTTP原理】1.安装homebrew03:15\n课时397视频【基础知识HTTP原理】2.安装nmap02:41\n课时398视频【基础知识HTTP原理】3.通过TCP测试ncat04:52\n章节115:【全栈入门系列】之【http原理】2\n课时399视频【基础知识HTTP原理】4不要怕,向前走04:24\n课时400视频【基础知识HTTP原理】5.架设第一台服务器06:01\n课时401视频【基础知识HTTP原理】6.以专业的角度看网址08:29\n章节116:【全栈入门系列】之【http原理】3\n课时402视频【基础知识HTTP原理】7.每次跳转的网页是怎么回事02:58\n课时403视频【基础知识HTTP原理】8.DNS与ISPs介绍07:17\n课时404视频【基础知识HTTP原理】9.localhost与端口04:17\n章节117:【全栈入门系列】之【http原理】4\n课时405视频【基础知识HTTP原理】10.再看我们的python服务03:46\n课时406视频【基础知识HTTP原理】11.通过ncat手动get网页03:15\n课时407视频【基础知识HTTP原理】12.什么是404?状态代码02:12\n章节118:【全栈入门系列】之【http原理】5\n课时408视频【基础知识HTTP原理】13.将用户重定向03:29\n课时409视频【基础知识HTTP原理】14.装成服务器跟用户02:53\n课时410视频【基础知识HTTP原理】15.硬核玩家用python手写03:16\n章节119:【全栈入门系列】之【http原理】6\n课时411视频【基础知识HTTP原理】勘误1.函数为do_GET,2.end_headers少了个s11:40\n课时412视频【基础知识HTTP原理】17.让服务器一直运行下去06:35\n课时413视频【基础知识HTTP原理】18.跑一跑我们手写的服务02:52\n章节120:【全栈入门系列】之【http原理】7\n课时414视频【基础知识HTTP原理】19.编码问题拓展05:21\n课时415视频【基础知识HTTP原理】20.小技巧涉及交互的服务04:40\n课时416视频【基础知识HTTP原理】21.搜索查询的时候网页07:42\n章节121:【全栈入门系列】之【http原理】8\n课时417视频【基础知识HTTP原理】22.查询为什么URL会变换03:31\n章节122:【全栈入门系列】之【手写一个小贴吧】1\n课时418视频【全栈工程师小项目:手写一个小贴吧】1.反思06:27\n课时419视频【全栈工程师小项目:手写一个小贴吧】206:19\n课时420视频【全栈工程师小项目:手写一个小贴吧】307:50\n章节123:【全栈入门系列】之【手写一个小贴吧】2\n课时421视频【全栈工程师小项目:手写一个小贴吧】402:17\n课时422视频【全栈工程师小项目:手写一个小贴吧】504:56\n课时423视频【全栈工程师小项目:手写一个小贴吧】609:41\n章节124:【全栈入门系列】之【手写一个小贴吧】3\n课时424视频【全栈工程师小项目:手写一个小贴吧】7.10:13\n课时425视频【全栈工程师小项目:手写一个小贴吧】808:24\n章节125:【全栈入门系列】之【利用Cookie精准营销】1试看\n课时426视频【全栈工程师小项目:利用Cookie精准营销】110:09可试看\n课时427视频【全栈工程师小项目:利用Cookie精准营销】209:36\n课时428视频【全栈工程师小项目:利用Cookie精准营销】307:23\n章节126:【全栈入门系列】之【利用Cookie精准营销】2\n课时429视频【全栈工程师小项目:利用Cookie精准营销】408:01\n课时430视频【全栈工程师小项目:利用Cookie精准营销】502:00\n课时431视频【全栈工程师小项目:利用Cookie精准营销】613:44\n章节127:【全栈入门系列】之【利用Cookie精准营销】3\n课时432视频【全栈工程师小项目:利用Cookie精准营销】712:29\n课时433视频全栈工程师小项目:利用Cookie精准营销】8.206:08\n课时434视频【全栈工程师小项目:利用Cookie精准营销】802:17\n章节128:【全栈入门系列】之【利用Cookie精准营销】4\n课时435视频【全栈工程师小项目:利用Cookie精准营销】909:17\n章节129:【全栈工程师数据库基础】1.数据库入门介绍\n课时436视频1.数据库内容介绍12:15\n课时437视频2.表格叫法介绍06:36\n课时438视频3.当下最流行的数据库环境06:46\n章节130:【全栈工程师数据库基础】2.下载MYSQL\n课时439视频4.下载MYSQL05:49\n课时440视频5.wget获取rpm文件04:31\n章节131:【全栈工程师数据库基础】3.选修:服务器1\n课时441视频选修:服务器的配置与安装08:37\n课时442视频选修:服务器的配置与安装202:22\n课时443视频选修:服务器的配置与安装303:06\n章节132:【全栈工程师数据库基础】4.选修:服务器2\n课时444视频选修:服务器的配置与安装402:19\n课时445视频选修:服务器的配置与安装506:56\n课时446视频选修:服务器的配置与安装602:42\n章节133:【全栈工程师数据库基础】SQL命令1.\n课时447视频SQL命令1.创建database05:32\n课时448视频SQL命令2.删除database03:22\n课时449视频SQL命令3.创建table05:48\n章节134:【全栈工程师数据库基础】SQL命令2.\n课时450视频SQL命令4.创建table203:20\n课时451视频SQL命令5:删除table03:33\n课时452视频SQL命令6:查看field03:09\n章节135:【全栈工程师数据库基础】SQL命令3.\n课时453视频SQL命令7:创建有限制的table05:08\n课时454视频SQL命令8:table中插入value07:28\n课时455视频SQL命令9:复习知识展示table02:09\n章节136:【全栈工程师数据库基础】SQL命令4.\n课时456视频SQL命令10:复习知识及展示table02:02\n课时457视频SQL命令11:Insert运用到table08:39\n课时458视频SQL命令12:选择性查找07:20\n章节137:【全栈工程师数据库基础】SQL命令5.\n课时459视频SQL命令13:反向查找03:15\n课时460视频SQL命令14:变更table增加列02:03\n课时461视频SQL命令15:附条件删除row05:16\n章节138:【全栈工程师数据库基础】SQL命令6.\n课时462视频SQL命令16:性能与index03:00\n课时463视频SQL命令17:贴index的方法05:36\n课时464视频SQL命令18:TRUNCATE删除table03:44\n章节139:【全栈工程师数据库基础】SQL命令7.\n课时465视频SQL命令19:自动增加编号09:53\n课时466视频SQL命令20:调整开始的数04:35\n课时467视频SQL命令21:原table上修改05:32\n章节140:【全栈工程师数据库基础】SQL命令8.\n课时468视频SQL命令22:sql自带count函数07:54\n课时469视频SQL命令23:创建员工薪酬表09:13\n课时470视频SQL命令24:员工薪酬表运算05:03\n章节141:【全栈工程师数据库基础】SQL命令9.\n课时471视频SQL命令25:LIKE模糊查找05:08\n课时472视频SQL命令26:创建view07:35\n课时473视频SQL命令27:join的准备工作移动编号04:33\n章节142:【全栈工程师数据库基础】SQL命令10.\n课时474视频SQL命令28:join的准备工作订单信息12:12\n课时475视频SQL命令29:innerjoin满足老板要求.06:51\n课时476视频SQL命令30:leftjoin满足老板要求12:42\n章节143:【全栈工程师数据库基础】SQL命令11.\n课时477视频SQL命令31:leftjoininnerjoin对比04:30\n课时478视频SQL命令32:举一反三rightjoin02:56\n课时479视频SQL命令33:fulljoin03:57\n章节144:【全栈工程师数据库基础】SQL命令12.\n课时480视频SQL命令34:union准备工作04:57\n课时481视频SQL命令35:介绍union05:19\n课时482视频SQL命令36:union实现fulljoin08:31\n章节145:【全栈工程师数据库基础】SQL命令13.\n课时483视频SQL命令37:order实现排序03:32\n课时484视频SQL命令38:找最大值和最小值08:06\n课时485视频SQL命令39:select大小写03:29\n章节146:【全栈工程师数据库基础】SQL命令14.\n课时486视频SQL命令40:老板又提要求了06:55\n课时487视频SQL命令41:满足老板作为结束05:01\n章节147:【全栈工程师Python数据库API】:1.Python打通\n课时488视频1.Python打通任督二脉07:38\n课时489视频2.常见数据库和对应API04:24\n课时490视频3.流程结构介绍06:39\n章节148:【全栈工程师Python数据库API】:2.VM解决方案\n课时491视频4.VM解决方案07:18\n课时492视频5.介绍vagrant02:15\n课时493视频6.本机上vagrant操作04:58\n章节149:【全栈工程师Python数据库API】:3.整体代码逻\n课时494视频7.整体代码逻辑05:24\n课时495视频8.postgresql简要介绍07:31\n课时496视频9.改写我们get_post函数06:31\n章节150:【全栈工程师Python数据库API】:4贴吧V1\n课时497视频10.改写我们的add_post函数05:20\n课时498视频11.有数据库的贴吧V105:51\n课时499视频12.我们的贴吧有漏洞06:45\n章节151:【全栈工程师Python数据库API】:5SQL注入攻击\n课时500视频13.针对我们贴吧进行攻击06:35\n课时501视频14.SQL攻击的基本原理06:06\n课时502视频15.format补充04:45\n章节152:【全栈工程师Python数据库API】:6攻击防护\n课时503视频16.有数据库的贴吧V205:15\n课时504视频17.第二轮脚本注入攻击测试05:53\n课时505视频18.处理用户输入防护进攻07:56\n课时506视频19.有数据库的贴吧V306:07\n课时507视频20.CRUD理念介绍06:05\n课时508视频21.ORM概念介绍.06:10\n课时509视频22.ORM概念图解09:24\n课时510视频23.时光穿越一下05:33\n课时511视频24.编写一款点餐软件“吃了吗?”06:36\n章节153:【全栈架构框架入门】之【Flask系列】\n课时512视频【Flask框架】1.拉出我的电磁炮!06:11\n课时513视频【Flask框架】2.讲一讲编程环境的问题06:49\n课时514视频【Flask框架】3.通过标准库配置venv配置环境06:31\n课时515视频【Flask框架】4.启动env环境05:11\n课时516视频【Flask框架】5.WSGI与PEP3333介绍02:32\n课时517视频【Flask框架】6.服务器中间件和应用层04:13\n课时518视频【Flask框架】7.WSGI代码示例03:57\n课时519视频【Flask框架】8.初始化Flask.06:27\n课时520视频【Flask框架】9.route装饰器07:03\n课时521视频【Flask框架】10.导出路径并部署超迷你版网站04:43\n课时522视频【Flask框架】11.巧用format实现URL交互06:01\n课时523视频【Flask框架】12.框架虽好不能依赖03:31\n课时524视频【挑战任务4】进阶内容已更新【783】节课00:48\n章节154:【Fintech入门】1.金融与科技结合\n课时525视频1.金融与科技结合03:25\n课时526视频2.课程内容介绍09:30\n课时527视频3.量化策略建模的基本组成09:42\n章节155:【Fintech入门】2.Fintech需要具备的基本知识\n课时528视频4.Fintech所需要具备的基本知识11:11\n课时529视频5.金融数据分析流程12:41\n课时530视频6.数据获取途径介绍12:36\n章节156:【Fintech入门】3.获得数据并全部显示\n课时531视频7.获得数据并全部显示08:56\n课时532视频8.储存数据到本地09:49\n课时533视频9.index为时间的小问题05:28\n章节157:【Fintech入门】4.自定义简单移动平均线\n课时534视频10.对每日收盘价画图09:26\n课时535视频11.为什么要自定义指标?06:41\n课时536视频12.自定义简单移动平均线18:21\n章节158:【Fintech入门】5.介绍matplotlib金融模块\n课时537视频13.利用matplotlib画复杂图11:49\n课时538视频14.交易量和价格08:07\n课时539视频15.介绍matplotlib金融模块12:05\n章节159:【Fintech入门】6.画出K线图\n课时540视频16.画出K线图12:25\n课时541视频17.进入有意思的量化分析04:07\n课时542视频18.获取综合指数成分股信息10:30\n章节160:【Fintech入门】7.分析网页爬取信息\n课时543视频19.分析网页爬取信息11:57\n课时544视频20.分析网页爬取信息206:05\n课时545视频21.完善代码仅显示ticker数据02:27\n章节161:【Fintech入门】8.批量化获取成分股数据\n课时546视频22.批量化获取成分股数据07:00\n课时547视频23.最新的proAPI接口09:48\n课时548视频24.调取API获取成分股07:21\n章节162: 【Fintech入门】9.批量调取数据储存CSV\n课时549视频25.逻辑判断满足接口条件13:57\n课时550视频26.批量调取数据储存CSV17:58\n课时551视频27.获取数据及项目总结07:48\n章节163:【Fintech入门】10.由复盘的故事开始\n课时552视频28.由“复盘”的故事开始11:06\n课时553视频29.归总到一个特性的大表06:20\n课时554视频30.汇总大表的思路整理05:16\n章节164:【Fintech入门】11.沪深300汇总收盘代码实现\n课时555视频31.沪深300汇总收盘价代码实现10:17\n课时556视频32.沪深300汇总收盘价代码实现213:02\n课时557视频33.pandas相关性源码推荐03:32\n章节165:【Fintech入门】12.皮尔逊积矩等相关系数\n课时558视频34.皮尔逊积矩相关系数介绍09:39\n课时559视频35.肯德尔等级相关系数介绍08:34\n课时560视频36.斯皮尔曼等级相关介绍与反思07:37\n章节166:【Fintech入门】13.计算储存画出热力图\n课时561视频37.计算储存画出热力图08:30\n课时562视频38.拿一只股票为例05:09\n课时563视频39.绝对价格变化与百分比辨析09:41\n章节167:【Fintech入门】14.计算并储存相关性表\n课时564视频40.强调百分比变化07:21\n课时565视频41.计算并储存相关性表08:42\n课时566视频42.热力图的介绍及运用08:38\n章节168:【Fintech入门】15.思考与解决问题的方法\n课时567视频43.思考与解决问题的方法09:33\n课时568视频44.绘制无tick的热力图08:19\n课时569视频45.绘制错位xtick与ytick14:09\n章节169:【Fintech入门】16.沪深300项目小结试看\n课时570视频46.最终版本的沪深300关系08:30\n课时571视频47.沪深300项目小结11:43可试看\n章节170:【Fintech入门】17.金融理论介绍\n课时572视频48.金融理论介绍09:22\n课时573视频49.现代组合理论MPT介绍12:04\n课时574视频50.N个资产组合公式15:21\n章节171:【Fintech入门】18.马科维茨有效前沿与效用\n课时575视频51.马科维茨有效前沿图形意义11:40\n课时576视频52.现实情况下的多资产组合和有效前沿07:21\n课时577视频53.效用概念介绍10:58\n章节172:【Fintech入门】19.最小风险组合推导\n课时578视频54.无风险资产+有风险资产效用最大化的推导08:29\n课时579视频55.风险资产+风险资产最大效用组合推导09:15\n课时580视频56.风险资产+风险资产的最小风险组合推导03:29\n章节173:【Fintech入门】20.理论总结与如何投入生产\n课时581视频57.两风险资产组合+无风险资产最优组合推导10:39\n课时582视频58.理论总结与如何投入生产08:30\n课时583视频59.理论与代码的转换思路06:38\n章节174:【Fintech入门】21.建模参数与代码的思路\n课时584视频60.就地取材使用本地数据16:01\n课时585视频61.思考:NaN数据drop还是不drop?08:33\n课时586视频62.建模参数与代码的思路04:30\n章节175:【Fintech入门】22.随机生成资产组合配比\n课时587视频63.代码进行模型初步参数的计算12:15\n课时588视频64.准备随机生成组合07:38\n课时589视频65.随机生成资产组合配比11:31\n章节176:【Fintech入门】23.矩阵介绍\n课时590视频66.矩阵介绍08:32\n课时591视频67.矩阵相加04:40\n课时592视频68.矩阵相减04:40\n章节177:【Fintech入门】24.矩阵相乘\n课时593视频69.矩阵相乘105:58\n课时594视频70.矩阵相乘211:58\n章节178:【Fintech入门】25.矩阵运算在组合回报的运用\n课时595视频71.矩阵运算在组合回报的运用105:06\n课时596视频72.矩阵运算在组合回报的运用205:57\n课时597视频73.矩阵运算在组合回报的运用306:55\n章节179:【Fintech入门】26.矩阵运算在组合风险的运用\n课时598视频74.矩阵运算在组合回报的运用405:47\n课时599视频75.矩阵运算在组合风险的运用110:33\n课时600视频76.矩阵运算在组合风险的运用210:39\n章节180:【Fintech入门】27.矩阵转置在组合风险的运用\n课时601视频77.矩阵运算在组合风险的运用303:57\n课时602视频78.矩阵转置在组合风险的运用10:42\n课时603视频79.矩阵计算组合风险代码实现11:13\n章节181:【Fintech入门】28.应用所学构建自己的组合\n课时604视频80.生成\\\"大数据\\\"模拟表15:53\n课时605视频81.画出两资产组合有效前沿10:52\n课时606视频82.应用所学构建你自己的股票组合06:41\n章节182:【Fintech入门】29.底层资产是投资的根本\n课时607视频83.wait!选什么股票放进组合里呢?07:38\n课时608视频84.A股常用财务数据来源及接口10:46\n课时609视频85.美股常用财务数据来源及接口05:14\n章节183:【Fintech入门】30.A股与美股财务数据接口\n课时610视频86.美股常用财务数据来源及接口206:53\n课时611视频87.下载你精选公司的财务数据07:51\n课时612视频88.基础资产基础资产基础资产06:47\n章节184:【Fintech入门】31.三大报表简要介绍\n课时613视频89.三大报表简要介绍10:06\n课时614视频90.利润表科目收入成本毛利率运营成本12:26\n课时615视频91.利润表非运营成本税费净利润10:26\n章节185:【Fintech入门】32.利用工具融合SEC报表数据\n课时616视频92.利用工具融合SEC报表数据.03:14\n课时617视频93.标准化数据vs精细化数据02:47\n课时618视频94.分析红帽公司订阅与培训服务05:38\n章节186:【Fintech入门】33.销售费用投研与退出成本\n课时619视频95.销售费用投研与退出成本09:01\n课时620视频96.利息收入支出与税收08:40\n课时621视频97.资产负债表与现金流量表07:46\n章节187:【Fintech入门】34.JupyterLab研究者强大武器\n课时622视频98.JupyterLab研究者的强大武器03:58\n课时623视频99.Jupyternotebook简要介绍与操作04:13\n课时624视频100.Jupyternotebook简要介绍与操作204:49\n课时625视频101.JupyterLab基础操作04:56\n章节188:【Fintech入门】35.找出三张报表index\n课时626视频102.JupyterLab快捷操作07:30\n课时627视频103.导入数据并dropNA10:24\n课时628视频104.找出三张报表index07:54\n章节189:【Fintech入门】36.切分出P&L利润表\n课时629视频105.插入cell与设置pandas配置05:41\n课时630视频106.切分出P&L利润表05:56\n课时631视频107.设置index及column08:58\n章节190:【Fintech入门】37.资产负债表的数据整理\n课时632视频108.资产负债表的数据整理06:29\n课时633视频109.现金流量表数据整理06:00\n章节191:【Fintech入门】38.报表转换字节流储存与传输试看\n课时634视频110.报表转换为字节流储存与传输06:10\n课时635视频111.将财务报表的全部数据画图08:28\n课时636视频112.财务数据图的微调05:54可试看\n课时637视频【Fintech进阶与未来】选修内容部分选自硬核FinTech欢迎继续学习09:37\n章节192:【选修】Fintech进阶:原理,思考与运用1经济试看\n课时638视频【Python与宏观经济】之1.【宏观经济与资本市场】06:25\n课时639视频【Python与宏观经济】之2.【全球资产配置考虑factor】09:07\n课时640视频【Python与宏观经济】之3.【金融市场对经济增长的影响】03:48\n课时641视频【Python与宏观经济】之4.【金融市场对经济增长的影响2】05:15\n课时642视频【Python与宏观经济】之5.【教育贸易监管与税收】04:46\n课时643视频【Python与宏观经济】之6.【强大的科研与数学工具】04:49\n课时644视频【Python与宏观经济】之7.【股票价格与GDP】04:45\n课时645视频【Python与宏观经济】之8.【链式法则和对数微分】07:58\n课时646视频【Python与宏观经济】之9.【股票与经济增长数学推导】07:44\n课时647视频【Python与宏观经济】之10.【EPS与GDP长期关系】07:49\n课时648视频【Python与宏观经济】之11.【PE与GDP长期关系】04:11\n课时649视频【Python与宏观经济】之12【股票投资与宏观经济的理论基础】06:22\n课时650视频【Python与宏观经济】】之13【潜在GDP增长与资产回报率】11:35\n课时651视频【Python与宏观经济】之14【需求拉动的通胀压力原理】05:47\n课时652视频【Python与宏观经济】之15【需求拉动的通胀压力代码】08:30\n课时653视频【Python与宏观经济】之16【通胀与固定收益投资】09:12\n课时654视频【Python与宏观经济】之17【成本拉动的通胀压力原理】04:30\n课时655视频【Python与宏观经济】之18【成本拉动通胀代码演示】06:41\n课时656视频【Python与宏观经济】之19【目前的聚焦:经济增长】03:02\n课时657视频【Python与宏观经济】之20【著名模型:Cobb-Douglas】08:01\n课时658视频【Python与宏观经济】之21【Cobb-Douglas生产函数理论】09:29\n课时659视频【Python与宏观经济】之22【规模报酬不变结论】05:31\n课时660视频【Python与宏观经济】之23【资本深化与技术进步原理】08:09\n课时661视频【Python与宏观经济】之24【公式的变形与简化】07:30\n课时662视频【Python与宏观经济】之25【人均资本与人均产出建模】10:26\n课时663视频【Python与宏观经济】之26【资本深化建模图解】04:01\n课时664视频【Python与宏观经济】之27【科技进步建模图解】04:40\n课时665视频【Python与宏观经济】之28【举一反三对数微分下】03:31\n课时666视频【Python与宏观经济】之29【变形与问题思考】06:18\n课时667视频【Python与宏观经济】之30【solow_resisual反推技术】03:43\n课时668视频【Python与宏观经济】之31【思路整理加入工具箱】07:16\n课时669视频【Python与宏观经济】之32【变形二把结论串起来】08:15\n课时670视频【Python与宏观经济】之33【变形二的因素解析】12:23\n课时671视频【Python与宏观经济】之34【经济稳定状况的alpha探讨】06:32\n课时672视频【Python与宏观经济】之35【经济稳定状况的alpha推论】07:13\n课时673视频【Python与宏观经济】之36【经济稳定状况的alpha推论】10:28\n课时674视频【Python与宏观经济】之37【马尔萨斯与古典经济增长】05:46\n课时675视频【Python与宏观经济】之38【古典经济增长理论讲解】08:58\n课时676视频【Python与宏观经济】之39【古典经济增长理论代码实现】10:27\n课时677视频【Python与宏观经济】之40【古典经济增长理论图形解释】04:38\n课时678视频【Python与宏观经济】之41【Solow与新古典增长理论】07:14\n课时679视频【Python与宏观经济】之42【新古典增长理论的平衡状态】06:45\n课时680视频【Python与宏观经济】之43【新古典平衡状态下的人均产出增长率】10:44\n课时681视频【Python与宏观经济】之44【新古典平衡状态下总GDP增长率07:38\n课时682视频【Python与宏观经济】之45【实物资本储备与投资损耗的影响】06:49\n课时683视频【Python与宏观经济】之46【封闭经济体储蓄与实物资本损耗研究】05:11\n课时684视频【Python与宏观经济】之47【引入损耗与劳动力输入的变形】10:37\n课时685视频【Python与宏观经济】之48【储蓄投资方程推导】06:53\n课时686视频【Python与宏观经济】之49【储蓄投资方程解释】04:57\n课时687视频【Python与外汇计算与预测】1.Forex介绍05:18\n课时688视频【Python与外汇计算与预测】2.从Alan欧洲五十国圆桌会议讲话说起05:32\n课时689视频【Python与外汇计算与预测】3.MT4简要介绍03:27\n课时690视频【Python与外汇计算与预测】4.外汇报价机制04:07\n课时691视频【Python与外汇计算与预测】5.基准货币和标价货币04:04\n课时692视频【Python与外汇计算与预测】6.名义汇率与实际汇率07:48\n课时693视频【Python与外汇计算与预测】7.一揽子价格CPI去除影响04:57\n课时694视频【Python与外汇计算与预测】8.设立基准年度CPI05:03\n课时695视频【Python与外汇计算与预测】9.实时经CPI调整的真实汇率思路拓展05:35\n课时696视频【Python与外汇计算与预测】10.中美常见官方经济数据来源介绍05:40可试看\n课时697视频【Python与外汇计算与预测】11.bid与ask价格介绍06:47\n课时698视频【Python与外汇计算与预测】12.套利的关键在于Spread05:58可试看\n课时699视频【Python与外汇计算与预测】13.Spread影响factor探讨05:12\n课时700视频【Python与外汇计算与预测】14.流动性溢价与Spread的探讨04:15\n课时701视频【Python与外汇计算与预测】15.Volatility溢价与Spread的探讨08:39\n课时702视频【Python与三角套汇】1.CrossRate套汇汇率概念与原理06:49\n课时703视频【Python与三角套汇】2.CR套汇汇率计算代码实现07:42\n课时704视频【Python与三角套汇】3.三角套汇的关键与CFTC交易商介绍05:05\n课时705视频【Python与三角套汇】4.计算crossrate与dealer报价比较06:13\n课时706视频【Python与三角套汇】5.crossrate与dealer原理讲解05:55\n课时707视频【Python与三角套汇】6.从USD开始的三角套汇原理07:47\n课时708视频【Python与三角套汇】7.从JPY开始的三角套汇原理02:29\n课时709视频【Python与三角套汇】8.USD套汇利润的计算09:38\n课时710视频【Python与三角套汇】9.JPY套汇利润的计算04:45\n章节193:【选修】Fintech进阶:原理,思考与运用2投研\n课时711视频【Python投研与决策】1.介绍05:23\n课时712视频【Python投研与决策】2.外部M&A与估值04:21\n课时713视频【Python投研与决策】3.内部投融资与资本结构08:34\n课时714视频【Python投研与决策】4.资本规划与项目估值基础与重点08:22\n课时715视频【Python投研与决策】5.常见项目1替换类项目08:19\n课时716视频【Python投研与决策】6.常见项目2扩张类项目07:13\n课时717视频【Python投研与决策】7.常见项目3研发类项目04:26\n课时718视频【Python投研与决策】8.常见项目4监管安全环境类项目05:47\n课时719视频【Python投研与决策】9.量化到现金流的注意事项08:55\n课时720视频【Python投研与决策】10.外部效应考虑之蚕食效应07:05\n课时721视频【Python投研与决策】11.外部效应考虑之溢出效应04:17\n课时722视频【Python投研与决策】12.折旧方法与现金流08:22\n课时723视频【Python投研与决策】13.A股与美股折旧方法双倍折旧与MACRS06:34\n课时724视频【Python投研与决策】14.加速折旧高估项目估值05:12\n课时725视频【Python投研与决策】15.折旧对现金流的影响06:34\n课时726视频【Python投研与决策】16.通胀对现金流的影响05:33\n课时727视频【Python投研与决策】17.扩张项目现金流分析1FC与WC投出06:01\n课时728视频【Python投研与决策】18.扩张项目现金流分析2OCF流入06:55\n课时729视频【Python投研与决策】19.扩张项目现金流分析3TNOCF流入05:14\n课时730视频【拓展】【现金流折现模型Python实现】1.建模思路07:01\n课时731视频【拓展】【现金流折现模型Python实现】2.NPV概念介绍06:17\n课时732视频【拓展】【现金流折现模型Python实现】3.货币的时间价值TVM补充07:57\n课时733视频【拓展】【现金流折现模型Python实现】4.以保单为例计算NPV06:56\n课时734视频【拓展】【现金流折现模型Python实现】5.计算保险公司为啥赚钱?03:54\n课时735视频【扩张项目Python建模估值】1.Initial_Stage投出去两笔必要投资04:57\n课时736视频【扩张项目Python建模估值】2.Operating_Stage计算OCF05:01\n课时737视频【扩张项目Python建模估值】3.Terminating_Stage计算TNOCF05:08\n课时738视频【扩张项目Python建模估值】【以William公司为例1】介绍案例104:46\n课时739视频【扩张项目Python建模估值】【以William公司为例2】介绍案例207:48\n课时740视频【扩张项目Python建模估值】【以William公司为例3】初始现金流07:10\n课时741视频【扩张项目Python建模估值】【以William公司为例4】CFO信息汇总04:25\n课时742视频【扩张项目Python建模估值】【以William公司为例5】批量CF函数05:22\n课时743视频【扩张项目Python建模估值】【以William公司为例6】最终现金函数05:29\n课时744视频【扩张项目Python建模估值】【以William公司为例7】调用函数03:08\n课时745视频【扩张项目Python建模估值】【以William公司为例8】易犯错误09:41\n课时746视频【扩张项目Python建模估值】【以William公司为例9】情况探讨07:30\n课时747视频【替换类项目Python建模估值】1.项目开始现金流流出04:54\n课时748视频【替换类项目Python建模估值】2.项目中期与结束现金流03:54\n课时749视频【替换类项目Python建模估值】【以William公司为例1】项目概要07:54\n课时750视频【替换类项目Python建模估值】【以William公司为例2】项目概要08:11\n课时751视频【替换类项目Python建模估值】【以William公司为例3】分析项目07:03\n课时752视频【替换类项目Python建模估值】【以William公司为例4】初始现金流05:46\n课时753视频【替换类项目Python建模估值】【以William公司为例5】期终现金流04:35\n课时754视频【替换类项目Python建模估值】【以William公司为例6】做判断09:38\n课时755视频【互斥类项目Python建模估值】1.运筹学与最优化问题08:06\n课时756视频【互斥类项目Python建模估值】2.思考问题的方式04:30\n课时757视频【互斥类项目Python建模估值】3.最小公倍数法04:24\n课时758视频【互斥类项目Python建模估值】4.养猪场与养牛场的例子04:54\n课时759视频【互斥类项目Python建模估值】5.LCM的函数编写05:43\n课时760视频【互斥类项目Python建模估值】6.LCM调整后的现金流08:35\n课时761视频【互斥类项目Python建模估值】7.LCM折现与判断04:51\n章节194:【选修】Fintech进阶:原理,思考与运用4衍生\n课时762视频【金融产品建模估值入门】1.欢迎来到Quant的世界07:01\n课时763视频【金融产品建模估值入门】2.衍生品的分类的知识架构06:11\n课时764视频【金融产品建模估值入门】3.期货期权与互换05:39\n课时765视频【金融产品建模估值入门】4.无套利定价原则03:06\n课时766视频【金融产品建模估值入门】5.远期合约定价原理08:02\n课时767视频【金融产品建模估值入门】6.股指期货与现货的正向套利原理03:11\n课时768视频【金融产品建模估值入门】7.CashCarry正向套利图解05:23\n课时769视频【金融产品建模估值入门】8.反向套利原理05:06\n课时770视频【金融产品建模估值入门】9.IF沪深300股指期货与现货为例03:48\n课时771视频【金融产品建模估值入门】10.现货期货时间差计算代码编写04:58\n课时772视频【金融产品建模估值入门】11.套利利润计算代码编写03:58\n课时773视频【金融产品建模估值入门】12.关于无风险利率的探讨06:30\n课时774视频【金融产品建模估值入门】13.返求回报率和思考why05:29\n课时775视频【金融产品建模估值入门】14.标的资产不同方法不同04:58\n课时776视频【金融产品建模估值入门】15.无分红股票定价原理03:55\n课时777视频【金融产品建模估值入门】16.无分红股票定价公式04:37\n课时778视频【金融产品建模估值入门】17.无分红股票远期合约例子06:49\n课时779视频【金融产品建模估值入门】18.无分红远期合约建模计算07:30\n课时780视频【金融产品建模估值入门】19.有分红远期合约定价原理05:31\n课时781视频【金融产品建模估值入门】20.期间分红远期合约定价原理05:25\n课时782视频【金融产品建模估值入门】21.期间分红远期合约定价公式05:41\n课时783视频【金融产品建模估值入门】22.综合指数合约定价问题04:33\n课时784视频【金融产品建模估值入门】23.补充知识之连续复利计算04:35\n课时785视频【金融产品建模估值入门】24.未来价格连续复利折现03:35\n课时786视频【金融产品建模估值入门】25.连续分红指数定价原理03:58\n章节195:【机器学习】旧版即将下线迭代新内容\n课时787视频1.机器学习介绍14:33\n课时788视频2.传统的编程与处理方法07:30\n课时789视频3.机器学习是与人类学习相反的过程03:09\n章节196:【Python机器学习入门】2.机器学习运用\n课时790视频4.机器学习最经典的运用:垃圾邮件分类06:53\n课时791视频5.图像识别医学金融方面运用07:08\n章节197:【Python机器学习入门】3.机器学习道德\n课时792视频6.道德方面需要注意的问题06:29\n章节198:【Python机器学习入门】4.机器学习误区\n课时793视频7.非监督式学习的例子08:10\n课时794视频8.机器学习的误区和要问的问题10:01\n课时795视频9.编程环境搭建与依赖库04:25\n章节199:【Python机器学习入门】5.找到数据源头预处理\n课时796视频10.找数据源头.09:49\n课时797视频11.对数据进行预处理05:25\n课时798视频12.预处理代码实现10:47\n章节200:【Python机器学习入门】6.训练集选取数据处理\n课时799视频13.训练集选取与数据处理07:20\n课时800视频14.预测天数代码实现15:07\n课时801视频15.shift与drop处理数据05:36\n章节201:【Python机器学习入门】7.黑箱与选取什么工具\n课时802视频16.数据放入黑箱测量准确率16:11\n课时803视频17.用支持向量机再算一遍05:44\n课时804视频18.选取什么样的工具放到箱中06:49\n章节202:【Python机器学习入门】8.预测下未来股价\n课时805视频19.预测下未来股价05:31\n课时806视频20.与时俱进更新我们的库03:39\n章节203:【Python机器学习入门】9.支持向量机数字识别\n课时807视频21.支持向量机介绍09:50\n课时808视频22.特征和标签09:12\n课时809视频23.数字识别的代码实现07:02\n章节204:【选修】【数据科学入门】1.课程介绍\n课时810视频1.数据科学介绍14:21\n课时811视频2.课程方向介绍10:56\n章节205:【数据科学入门】2.Kaggle介绍与数据来源\n课时812视频3.Kaggle介绍与数据来源05:47\n课时813视频4.Kaggle数据下载06:18\n课时814视频5.从零编写读取数据函数05:09\n章节206:【数据科学入门】3.数据类型强调与转换\n课时815视频6.调用自己的函数读取数据06:44\n课时816视频7.数据缺失先判断再放入07:50\n课时817视频8.数据类型强调与转换12:18\n章节207:【数据科学入门】4.数据预处理之特征缩放\n课时818视频9.正式介绍特征缩放11:40\n课时819视频10.自己写函数找到最大值最小值10:17\n课时820视频11.离差标准化代码实现12:32\n章节208:【数据科学入门】5.标准化的运用介绍\n课时821视频12.标准化的运用介绍03:27\n课时822视频13.标准化的定义介绍07:34\n课时823视频14.数据平均数函数代码实现05:22\n章节209:【数据科学入门】6.占位小技巧精简代码\n课时824视频15.占位小技巧精简代码06:25\n课时825视频16.方差定义介绍与数据处理思路05:22\n课时826视频17.方差与标准差的代码实现12:54\n章节210:【数据科学入门】7.未知变已知剩下的就好办了\n课时827视频18.未知变已知剩下的就好办了07:20\n课时828视频19.标准化我们的数据08:40\n课时829视频21.特征缩放用于Kaggle真实数据11:53\n课时830视频20.特征缩放小结05:45\n章节211:【数据科学入门】8.特征缩放Kaggle真实数据\n课时831视频22.其他的数据变形方法拓展07:29\n课时832视频23.重抽样方法介绍05:51\n章节212:【数据科学入门】9.自己写一个训练测试函数\n课时833视频24.train_test_split原理介绍07:37\n课时834视频25.自己写一个训练测试函数06:29\n课时835视频26.补充生成伪随机数函数04:05\n章节213:【数据科学入门】10.通过seed控制伪随机数\n课时836视频27.完成训练测试切分06:16\n课时837视频28.通过seed控制伪随机数06:50\n课时838视频29.思考我们的方法的问题04:36\n章节214:【数据科学入门】11.两种split方法优缺点对比\n课时839视频30.k_fold交叉验证09:56\n课时840视频31.另外一个角度思考介绍04:53\n课时841视频32.两种split方法优缺点对比02:45\n章节215:【数据科学入门】12.偏差vs方差的权衡\n课时842视频33.有偏的模型VS不幸的选取07:36\n课时843视频34.偏差vs方差的权衡09:33\n课时844视频35.k_fold里面的k取值探讨14:57\n章节216:【数据科学入门】13.解决k_fold问题的思路\n课时845视频36.代码解决k_fold问题的思路07:19\n课时846视频37.k_fold切分代码实现09:46\n课时847视频38.小篮子装满装进大篮子08:05\n章节217:【数据科学入门】14.重抽样方法思路与总结\n课时848视频39.重抽样方法思路整理与总结09:02\n课时849视频40.准确度和精密度辨析106:07\n课时850视频41.射击比赛的例子07:26\n章节218:【数据科学入门】15.准确度计算代码实现\n课时851视频42.学习方法:内涵和外延.04:13\n课时852视频43.准确度计算代码实现07:55\n课时853视频44.分类项目测试准确度04:24\n章节219:【数据科学入门】16.混淆矩阵特性介绍\n课时854视频45.分类问题混淆矩阵介绍06:53\n课时855视频46.混淆矩阵特性介绍03:52\n课时856视频47.识别统计学家玩的鬼把戏11:07\n章节220:【数据科学入门】17.一类错误和二类错误\n课时857视频48.混淆矩阵中的细节介绍05:57\n课时858视频49.一类错误和二类错误06:18\n课时859视频50.大量比率拓展调和平均F1值等06:10\n章节221:【数据科学入门】18.写代码前分析规律和对策\n课时860视频51.写代码前分析规律和对策06:16\n课时861视频52.用我们学过的的技巧解决04:11\n课时862视频53.占位+列表解决第一个特性05:58\n章节222:【数据科学入门】19.查字典的方法填充矩阵\n课时863视频54.示范如何不要迷失在细节04:59\n课时864视频55.字典储存与index05:46\n课时865视频56.查字典的方法填充矩阵06:29\n章节223:【数据科学入门】20.生成可自动调整混淆矩阵\n课时866视频57.对矩阵结果的解读05:03\n课时867视频58.生成可自动调整的混淆矩阵08:53\n课时868视频59.反思可能的Bug情况05:47\n课时869视频60.思路整理与小结03:15\n章节224:【数据科学入门】21.MAE法与RMSE法\n课时870视频61.平均绝对误差概念介绍04:25\n课时871视频62.平均绝对误差公式详解04:42\n课时872视频63.平均绝对误差代码实现04:12\n课时873视频64.平均绝对误差数据检测03:00\n课时874视频65.MAE法的缺陷与改进03:47\n课时875视频66.均方根误差公式简介04:25\n课时876视频67.RMSE方法代码实现03:59\n课时877视频68.RMSE方法数据检测04:44\n课时878视频69.比较基准模型介绍07:03\n课时879视频70.随机预测算法建立基准模型10:08\n课时880视频71.ZeroR方法原理介绍08:06\n课时881视频72.ZeroR解决分类问题的基准模型07:30\n课时882视频73.回归问题的基准模型思路03:34\n课时883视频74.ZeroR解决回归问题代码06:03\n章节225:【知识拓展】【Python与统计学】\n课时884视频【Python与统计学】1.描述性统计与推断性统计07:43\n课时885视频【Python与统计学】2.推断性统计三步走取样预测假设检验04:55\n课时886视频【Python与统计学】3.统计方法point_estimation点估计04:52\n课时887视频【Python与统计学】4.统计方法confidence_interval置信区间06:40\n课时888视频【Python与统计学】5.Z与t分布06:20\n课时889视频【Python与统计学】6.假设性检验的核心**04:31\n课时890视频【Python与统计学】7.提出单尾的假设性检验假设06:30\n课时891视频【Python与统计学】8.提出双尾的假设性检验假设04:03\n课时892视频【Python与统计学】9.计算t统计量06:17\n课时893视频【Python与统计学】10.画t分布图与单双尾巴判断07:23\n课时894视频【Python与统计学】11.确定置信区间判断是否小概率事件06:49\n课时895视频【答疑】【N-1与贝塞尔校正】1.用样本估计总体的公式讲解07:55\n课时896视频【答疑】【N-1与贝塞尔校正】2.随机生成10万个总体数据06:30\n课时897视频【答疑】【N-1与贝塞尔校正】3.随机抽取500次样本06:46\n课时898视频【答疑】【N-1与贝塞尔校正】4.ddof参数有偏的计算04:09\n课时899视频【答疑】【N-1与贝塞尔校正】5.rolling和expanding操作07:16\n课时900视频【答疑】【N-1与贝塞尔校正】6.有偏的variance可视化03:25\n课时901视频【答疑】【N-1与贝塞尔校正】7.有偏与无偏可视化对比08:44\n课时902视频【答疑】【贝塞尔校正数学推导】1.Variance特性讲解04:48\n课时903视频【答疑】【贝塞尔校正数学推导】2.逐个击破得证04:32\n课时904视频【答疑】【贝塞尔校正数学推导】3.数学计算偏差表达式04:37\n课时905视频【答疑】【贝塞尔校正数学推导】4.快速推导与记忆方法介绍05:41\n课时906视频【答疑】【利用假设性检验检验相关性】1.害怕相关性不靠谱04:18\n课时907视频【答疑】【利用假设性检验检验相关性】2.第一步_立无相关性靶子05:04\n课时908视频【答疑】【利用假设性检验检验相关性】3.第二步_计算T统计量06:02\n课时909视频【答疑】【利用假设性检验检验相关性】4.第二步_关于自由度探讨03:29\n课时910视频【答疑】【利用假设性检验检验相关性】5.第三步_画分布04:17\n课时911视频【答疑】【利用假设性检验检验相关性】6.第三步_如何查T分布表04:36\n课时912视频【答疑】【利用假设性检验检验相关性】7.第四步_做判断04:39\n课时913视频【答疑】【利用假设性检验检验相关性】8.局限性1非线性相关05:25\n课时914视频【答疑】【利用假设性检验检验相关性】9.局限性2异常值05:56\n课时915视频【答疑】【利用假设性检验检验相关性】10.局限性3伪相关05:10\n课时916视频【答疑】【利用假设性检验检验相关性】11.局限性4伪相关例子05:00\n章节226:【数据科学与机器学习】【算法,原理与构造】\n课时917视频【DS与ML算法构建】【简单线性回归】1.简单线性回归04:40\n课时918视频【DS与ML算法构建】【简单线性回归】2.回归虽简单不能一上来就用05:59\n课时919视频【DS与ML算法构建】【简单线性回归】3.工作年限与收入的关系为例07:05\n课时920视频【DS与ML算法构建】【简单线性回归】4.利用pandas快速了解数据03:21\n课时921视频【DS与ML算法构建】【简单线性回归】5.scatterplot快速了解数据03:29\n课时922视频【DS与ML算法构建】【简单线性回归】6.seaborn等可视化08:28\n课时923视频【DS与ML算法构建】【简单线性回归】7.协方差概念04:16\n课时924视频【DS与ML算法构建】8.N与N-1的问题答疑详细见上章节统计学09:32\n课时925视频【DS与ML算法构建】【简单线性回归】8.协方差数学定义05:41\n课时926视频【DS与ML算法构建】【简单线性回归】9.协方差的缺陷皮尔逊相关性04:39\n课时927视频【DS与ML算法构建】【简单线性回归】10.皮尔逊相关性数学定义04:02\n课时928视频【DS与ML算法构建】【简单线性回归】11.方差为协方差的特殊情况03:50\n课时929视频【DS与ML算法构建】【简单线性回归】12.均值与方差代码实现08:09\n课时930视频【DS与ML算法构建】【简单线性回归】13.研究理论与工程实现探讨07:04\n课时931视频【DS与ML算法构建】【简单线性回归】14.Cov代码实现04:42\n课时932视频【DS与ML算法构建】【简单线性回归】15.如何验证我们函数对不对07:40\n课时933视频【DS与ML算法构建】【简单线性回归】16.构建与验证标准差函数09:20\n课时934视频【DS与ML算法构建】【简单线性回归】17.构建与验证相关性函数07:23\n课时935视频【DS与ML算法构建】18.相关性假设检验答疑详细见上章统计学03:24\n课时936视频【DS与ML算法构建】【简单线性回归】19.自变量和因变量04:58\n课时937视频【DS与ML算法构建】【简单线性回归】20.回归方程07:47\n课时938视频【DS与ML算法构建】【简单线性回归】21.OLS最小二乘法公式图形08:19\n课时939视频【DS与ML算法构建】【简单线性回归】22.系数的确定数学公式07:04\n课时940视频【DS与ML算法构建】【简单线性回归】23.ρ与beta与b1关系08:25\n课时941视频【DS与ML算法构建】【简单线性回归】24.系数函数代码实现06:14\n课时942视频【DS与ML算法构建】【简单线性回归】25.确定回归方程04:09\n课时943视频【DS与ML算法构建】【简单线性回归】26.预测函数编写06:40\n课时944视频【DS与ML算法构建】【简单线性回归】27.RMSE检测准确性代码实现05:02\n课时945视频【DS与ML算法构建】【简单线性回归】28.测试数据的处理04:46\n课时946视频【DS与ML算法构建】【简单线性回归】29.利用模型预测收入04:59\n课时947视频【DS与ML算法构建】【简单线性回归】30.检验模型准确率05:12\n课时948视频【DS与ML算法构建】【简单线性回归】31.检验模型准确率207:34\n课时949视频【DS与ML算法构建】【简单线性回归】【建模技巧1】03:23\n课时950视频【挑战任务2】进阶内容已更新【409】节课00:48\n章节227:【选修:进阶之路】算法数据结构面试未来等试看\n课时951视频1.进阶之路(算法数据结构程序设计)09:45可试看\n课时952视频2.进阶之路(面试转行未来发展)06:57可试看\n课时953视频【进阶之路】之【Python中高阶】3.说在前面的话10:14\n课时954视频【进阶之路】之【Python中高阶】4.Python与解释型语言10:14\n课时955视频【进阶之路】之【Python中高阶】5.调出解释器运行程序05:19\n课时956视频【进阶之路】之【Python中高阶】6.可交互解释器05:01\n课时957视频【进阶之路】之【装饰器】1.什么是装饰器03:54\n课时958视频【进阶之路】之【装饰器】2.写一个装饰器吧06:22\n课时959视频【进阶之路】之【装饰器】3.复杂的装饰器03:53\n课时960视频【进阶之路】之【装饰器】4.更加复杂的装饰器06:15\n课时961视频【进阶之路】之【Python中的对象】7.Python中的对象初探08:14\n课时962视频【进阶之路】之【Python中的对象】8.赋值语句与标识符02:58\n课时963视频【进阶之路】之【Python中的对象】9.标识符的两个特性05:38\n课时964视频【进阶之路】之【Python中的对象】10.动态语言和静态语言06:04\n课时965视频【进阶之路】之【Python中的对象】11.对象的alias别名04:46\n课时966视频【进阶之路】之【Python中的对象】12.alias与多个标识符图解05:12\n课时967视频【进阶之路】之【Python中的对象】13.标识符与binding关系06:15\n课时968视频【挑战任务1】进阶内容已更新【339】节课00:48\n章节228:【附赠】【编程让生活更美好】之【商业爬虫】试看\n课时969视频爬虫/自动化/小技巧/好玩小项目【持续更新】10:34可试看\n课时970视频【爬虫系列】2.强大的信息搜集工具04:30\n课时971视频【爬虫系列】3.快速回顾什么是互联网07:27\n课时972视频【爬虫系列】4.Python标准库打开网页06:24\n课时973视频【爬虫系列】5.BeautifulSoup介绍05:36\n课时974视频【爬虫系列】6.建立虚拟环境安装bs406:01\n课时975视频【爬虫系列】7.虚拟环境启动自带idle04:45\n课时976视频【爬虫系列】8.使用bs4快速找06:46\n课时977视频【爬虫系列】9.是不是爬虫开着就能去睡觉了?02:57\n课时978视频【爬虫系列】10.常见错误代码02:50\n课时979视频【爬虫系列】11.404错误如何解决05:29\n课时980视频【爬虫系列】12.没这个url怎么爬?04:25\n课时981视频【爬虫系列】13.有url有网页没tag也会报错06:14\n课时982视频【爬虫系列】14.链家网title爬取举例07:48\n课时983视频【爬虫系列】15.写一个专爬标题的函数06:39\n课时984视频【爬虫系列】16.拿百度必应做实验吧05:54\n课时985视频【爬虫系列】17.inspect分析网站元素04:10\n课时986视频【爬虫系列】18.采用html解析维基百科04:15\n课时987视频【爬虫系列】19.爬下维基百科可选语言04:21\n课时988视频【爬虫系列】20.爬下维基10大主要语言06:55\n课时989视频【爬虫系列】21.以东方财经网为例介绍层级07:08\n课时990视频【爬虫系列】22.每天自动抓取论坛信息04:31\n课时991视频【爬虫系列】23.批量抓取论坛头条05:59\n课时992视频【爬虫系列】24.网站链接跳转与多网页爬虫07:42\n课时993视频【爬虫系列】25.爬下股吧所有帖子链接09:29\n课时994视频【挑战任务3】进阶内容已更新【548】节课00:48\n章节229:【附赠】【编程让生活更美好】之【架设服务】\n课时995视频【实用】【搭建服务器哪里都能写Python】1.项目介绍03:06\n课时996视频【实用】【搭建服务器哪里都能写Python】2.JupyterNote架构介绍06:16\n课时997视频【实用】【搭建服务器哪里都能写Python】3.阿里云弹性云ECS介绍03:56\n课时998视频【实用】【搭建服务器哪里都能写Python】4.弹性云实例简要介绍06:21\n课时999视频【实用】【搭建服务器哪里都能写Python】5.连接云服务器03:00\n课时1000视频【实用】【搭建服务器哪里都能写Python】6.wget下载anaconda03:49\n课时1001视频【实用】【搭建服务器哪里都能写Python】7.云端安装anaconda03:23\n课时1002视频【实用】【搭建服务器哪里都能写Python】8.利用Ipython生成密码04:21\n课时1003视频勘误:为c.Notebook,详见公众号:乐学Fintech 笔记中操作06:16\n课时1004视频【实用】【搭建服务器哪里都能写Python】10.记得开放8888端口02:13\n课时1005视频【实用】【搭建服务器哪里都能写Python】11.连服务器躺着跑代码04:00\n章节230:【附赠】【编程让生活更美好】之【Excel】\n课时1006视频【办公自动化】之【Python操控Excel】1.利用Python让生活更美好04:19\n课时1007视频【办公自动化】之【Python操控Excel】2.有好工具不代表不接地气06:53\n课时1008视频【办公自动化】之【Python操控Excel】3.连接交互优瑞卡09:26\n课时1009视频【办公自动化】之【Python操控Excel】4.windows下库安装环境配置09:48\n课时1010视频【办公自动化】之【Python操控Excel】5.xlwings文档与实例概念05:55\n课时1011视频【办公自动化】之【Python操控Excel】6.一个excel不够我要打三个05:56\n课时1012视频【办公自动化】之【Python操控Excel】7.探讨app批量生成大量文件08:35\n课时1013视频【办公自动化】之【Python操控Excel】8.转换为我们熟悉的知识04:55\n课时1014视频【办公自动化】之【Python操控Excel】9.Excel是我们数据展示工具03:38\n课时1015视频【办公自动化】之【Python操控Excel】10.二维平面每个格子操作10:57\n课时1016视频【办公自动化】之【Python操控Excel】11.Excel作为数据储存工具14:00\n课时1017视频【办公自动化】之【Python操控Excel】12.将Excel数据批量读取10:37\n课时1018视频【办公自动化】之【Python操控Excel】13.小任务热身与复习随机数07:33\n课时1019视频【办公自动化】之【Python操控Excel】14.特工编号与特工任务练习11:42\n课时1020视频【每周更新】1000+以上内容【隐藏在】各方向【挑战任务】中00:48"`;

console.time("without-gfm");
remark().processSync(str);
console.timeEnd("without-gfm");

console.time("with-gfm");
remark().use(gfm).processSync(str);
console.timeEnd("with-gfm");

// Result
// without-gfm: 43.015ms
// with-gfm: 1.413s

Add ability to enable checkbox inputs

Initial checklist

Problem

I'd like the option to allow checkbox fields to be rendered without the "disabled" attribute, so users can read posts and check off items as they perform them like a todo list

Solution

Add option to remove disabled attribute from checkbox lists

Alternatives

Can't find one.

Link text are getting escaped like this http\://localhost

Subject of the issue

Following markdown gets replaced with an escaped link text.

[http://localhost]: http://localhost "Your localhost webserver running on http"

# My document title

This is my input markdown using a link reference [http://localhost][].

Which in turn is translated to

[http://localhost]: http://localhost "Your localhost webserver running on http"

# My document title

This is my input markdown using a link reference [http\://localhost][http://localhost].

Your environment

  • OS: MacOS
  • Packages: remark 13.0.0, remark-gfm 1.0.0
  • Env: node 15.0.3

Steps to reproduce

https://codesandbox.io/s/remark-debug-forked-ocyxp?file=/src/index.js

Expected behavior

The result should be like

[http://localhost]: http://localhost "Your localhost webserver running on http"

# My document title

This is my input markdown using a link reference [http://localhost][http://localhost] and some more text.

Actual behavior

[http://localhost]: http://localhost "Your localhost webserver running on http"

# My document title

This is my input markdown using a link reference [http\://localhost][http://localhost] and some more text.

TypeError: self.parser.lazy is undefined

Initial checklist

Affected packages and versions

[email protected]

Link to runnable example

No response

Steps to reproduce

Simplified snippet:

import ReactMarkdown from "react-markdown"
import remarkGfm from "remark-gfm"

<ReactMarkdown
  children="# Foo\nbar\n"
  // @ts-expect-error # See https://github.com/rehypejs/rehype/discussions/63
  remarkPlugins={[remarkGfm]}
/>

Not sure why, but the \n characters appear to be throwing error.

Expected behavior

No error

Actual behavior

TypeError: self.parser.lazy is undefined
lineStart
node_modules/@sunknudsen/react-cms/node_modules/micromark-extension-gfm-table/lib/syntax.js:563

561 |
562 | function lineStart(code) {
563 | return self.parser.lazy[self.now().line] ? nok(code) : ok(code)
> 564 | }
565 | }
566 | } // Based on micromark, but that won’t work as we’re in a table, and that expects
567 | // content.

Runtime

Node v14

Package manager

npm v6

OS

macOS

Build and bundle tools

Webpack

Unable to escape GFM autolinking

Initial checklist

Affected packages and versions

[email protected], [email protected], [email protected]

Link to runnable example

https://codesandbox.io/s/ecstatic-taussig-j1fxd

Steps to reproduce

const doc = `## test

https://www.example.com

https\\://www\\.example.com

`;
console.log('markdown:')
console.log(doc);

const mdast = unified()
  .use(remark)
  .use(gfm)
  .parse(doc);


console.log('mdast:')
console.log(inspect(mdast));

const md = unified()
  .use(stringify)
  .use(gfm)
  .stringify(mdast);

console.log('stringify md:')
console.log(md)

Expected behavior

it should not create links for the escaped urls.

Actual behavior

it creates links for the escaped urls:

root[3] (1:1-7:1, 0-61)
├─0 heading[1] (1:1-1:8, 0-7)
│   │ depth: 2
│   └─0 text "test" (1:4-1:8, 3-7)
├─1 paragraph[1] (3:1-3:24, 9-32)
│   └─0 link[1]
│       │ title: null
│       │ url: "https://www.example.com"
│       └─0 text "https://www.example.com"
└─2 paragraph[1] (5:1-5:26, 34-59)
    └─0 link[1]
        │ title: null
        │ url: "https://www.example.com"
        └─0 text "https://www.example.com"

Note, the escaped characters are already swallowed when parsing w/o gfm:

mdast:
root[3] (1:1-7:1, 0-61)
├─0 heading[1] (1:1-1:8, 0-7)
│   │ depth: 2
│   └─0 text "test" (1:4-1:8, 3-7)
├─1 paragraph[1] (3:1-3:24, 9-32)
│   └─0 text "https://www.example.com" (3:1-3:24, 9-32)
└─2 paragraph[1] (5:1-5:26, 34-59)
    └─0 text "https://www.example.com" (5:1-5:26, 34-59)

Runtime

Node v16

Package manager

npm v7

OS

macOS

Build and bundle tools

No response

TypeError: Cannot read property '18' of undefined

Initial checklist

Affected packages and versions

remark-gfm 2.0.0

Link to runnable example

No response

Steps to reproduce

  1. clone code from webpack/webpack.js.org#5396
  2. run yarn
  3. run yarn start

Expected behavior

No error.

Actual behavior

Errors like Cannot read property '29' of undefined show up many times. For example, https://github.com/webpack/webpack.js.org/pull/5396/checks?check_run_id=3495415399#step:5:3025.

FYI we don't use react-markdown, so it might not be related to #22. And the error is not helpful at all, so I don't know how to track it down the problem.

Runtime

Node v12

Package manager

yarn v1

OS

Linux

Build and bundle tools

Webpack

line-break doesn't work in table header

Initial checklist

Affected packages and versions

[email protected], [email protected], [email protected]

Link to runnable example

No response

Steps to reproduce

https://codesandbox.io/s/react-markdown-error-re8f3g?file=/pages/index.js

Expected behavior

head1 head2
new line
col1 col2

Actual behavior

head1 head2 <\br> new line
col1 col2

Runtime

Node v16

Package manager

npm 6

OS

macOS

Build and bundle tools

Next.js

Add "title" to footnotes

Initial checklist

Problem

Currently, the footnotes are appended at the end of the page. Only way to view footnotes is to click the link and the long page scrolls down. And then, click the ↩ symbol again to go back. This is really tedious if a page has many footnotes.

What if I want to quickly glance a particular small footnote, without scrolling the page up and down every time?

Solution

Simply, add a "title" attribute to the link of the footnote.

E.g.,

Currently, the following markdown:

Chapter[^1]

[^1]: First footnote content here

Generates this HTML:

<sup id="fnref-1"><a href="#fn-1" class="footnote-ref">1</a></sup>

...More content...

<div class="footnotes">
<hr>
<ol>
<li id="fn-1">First footnote content here<a href="#fnref-1" class="footnote-backref"></a></li>
</ol>
</div>

But, rather, it would be great if it becomes like this:

<sup id="fnref-1"><a href="#fn-1" class="footnote-ref" title="First footnote content here">1</a></sup>

...More content...

<div class="footnotes">
<hr>
<ol>
<li id="fn-1">First footnote content here<a href="#fnref-1" class="footnote-backref"></a></li>
</ol>
</div>

  1. A title attribute on the <a> tag with the text content of the footnote in the title would be make it really easy to just hover the mouse to view the "title" or add some pseudo CSS like :hover, ::before to view on mobile too.

  2. If someone wants to view the whole footnote, one can still click on the click and scroll to the bottom of the page.

  3. If someone wants to just see the text of the footnote, it can be viewed then and there itself by hovering on the little link, and no need to scroll again and again.

Alternatives

?

Directly maxed the CPU 100%

Initial checklist

Affected packages and versions

3.0.1

Link to runnable example

No response

Steps to reproduce

import { unified } from "unified";
import remarkParse from "remark-parse";
import remarkMath from "remark-math";
import remarkStringify from "remark-stringify";
import { visit } from "unist-util-visit";
import remarkGfm from "remark-gfm";

export const remarkKhan = unified()
  .use(remarkParse)
  .use(remarkGfm)
  .use(remarkStringify)
  .freeze();

useage:

remarkKhan()
    .processSync(text)
    .toString();

my text:

| Column A | Column B | Column C |
| -------- | -------- | -------- |
| A1       | B1       | C1       |
| A2       | B2       | C2       |
| A3       | B3       | C3       |

|               torbet ismi |                      torbet adrehsi                       |                       torbet tili |      khasliqi |
| ------------------------: | :-------------------------------------------------------: | --------------------------------: | ------------: |
|              ulinish tori |                   http://www.ulinix.com                   |                         uyghurche |               |
|               elkvyi tori |                  https://www.alkuyi.com                   |                         uyghurche |       taratqu |
|              toghraq tori |                  https://www.tograk.tech                  |                         uyghurche |               |
|              losfehr tori |                     https://losfer.cn                     |                         uyghurche |               |
|           /Eliyar's Blog/ |                    https://eliyar.biz                     |                         khenzuche | shekhsiy blog |
|             /PDF to Docx/ |                   https://pdf2docx.com                    |                       inhgilizche | wheqsiz qural |
|              **新闻在线 |                  http://www.xjtvs.com.cn                  |                         khenzuche |               |
|               kheliq tori |                http://uyghur.people.com.cn                |                         uyghurche |       taratqu |
|          shinjang gehziti |                 http://uyghur.xjdaily.com                 |                         uyghurche |       taratqu |
|               ashpez tori |                     https://axpaz.cn                      |                         uyghurche |               |
|          otqash ep baziri |                   https://www.otkax.com                   |                         uyghurche |               |
|                uchur tori |                    https://www.uqur.cn                    |                         uyghurche |               |
|           aqsu uchur tori |                    http://www.0997.cn                     |                         uyghurche |               |
|                  nur tori |                    https://www.nur.cn                     |                         uyghurche |               |
|                 izde tori |                      http://izda.com                      |                         uyghurche |        izdesh |
| bilogir tehkhnika munbiri |                   https://www.shiftt.cn                   |                         uyghurche |               |
|     okyan tehkhnika blogi |                  https://okyan.360zg.net                  |                         uyghurche |               |
|   izdel tehkhnika munbiri |                   https://www.izdal.cn/                   |                         uyghurche |               |
|              izwhar blogi |          http://izhar.cn<br>https://bg.izhar.cn           | uyghurche & khenzuche qosh tilliq |               |
|  bilqut tehkhnika munbiri |                   https://www.bilkut.cn                   |                         uyghurche |               |
|      bilimnur saghlamliqi |                 https://www.bilimnur.com                  |                         uyghurche |               |
|                nurum tori |                     http://nur512.cn                      |                         uyghurche |               |
|               /LearnFans/ |                 https://www.learnfans.com                 |                         uyghurche |               |
|        alwun kechmishliri |                      http://alwun.cn                      |                         uyghurche |               |
|             julaliq blogi |                  http://www.julaliq.com                   |                         uyghurche |               |
|  /uyghurix/<br>/ugubuntu/ | https://uyghurix.net<br>https://www.uyghurix.net/ugubuntu |                         uyghurche |               |
|             bilimler tori |                 https://www.bilimlar.com                  |                         uyghurche |               |
|           uyghursoft tori |                   http://uighursoft.com                   |                       qosh tilliq |               |
|               ashpez tori |                     https://axpaz.cn                      |                         uyghurche |               |
|               khiyal tori |                   http://www.hiyal.com                    |                         uyghurche |               |
|                bigim tori |                     https://begem.cn                      |                         khenzuche |               |
|                uzdil tori |                 https://uzdilim.github.io                 |                         uyghurche |               |
|                nurum tori |                     http://nur512.cn                      |                         uyghurche |               |
 

Expected behavior

normal parse and speed up

Actual behavior

Directly maxed the CPU 100%

Runtime

Node v12

Package manager

yarn v2

OS

macOS

Build and bundle tools

Vite

Footnotes order inside table is reversed

Initial checklist

Affected packages and versions

"remark-gfm": "^3.0.1"

Link to runnable example

No response

Steps to reproduce

// Node v18.13.0

/* Input */
Before tableeeeeeeeeee [^t0]

| h1 [^h1] | h2 [^h2] | h3 [^h3] |
| --- | --- | --- |
| 1 [^c1] | 2 [^c2] | 3 [^c3] | 
| 4 [^c4] | 5 [^c5] | 6 [^c6] |
| 7 [^c7] | 8 [^c8] | 9 [^c9] |

After table[^t1]

[^t0]: t0
[^h1]: h1
[^h2]: h2
[^h3]: h3
[^c8]: c8
[^c9]: c9
[^t1]: t1
[^c1]: c1
[^c2]: c2
[^c3]: c3
[^c4]: c4
[^c5]: c5
[^c6]: c6
[^c7]: c7
/* mdsvex.config.js */
const config = defineConfig({
	extensions: ['.svelte.md', '.md', '.svx'],

	remarkPlugins: [
		remarkParse,
		remarkGfm,
	],
	rehypePlugins: [
		rehypeStringify,
	 ],
	... More Code ...
});

/* svelte.config.js */
... More Code ...
import { mdsvex } from 'mdsvex';
import mdsvexConfig from './mdsvex.config.js';

const config = {
	extensions: ['.svelte', ...mdsvexConfig.extensions],

	preprocess: [
		mdsvex(mdsvexConfig)
	],
	... More Code ...
}

Expected behavior

Before tableeeeeeeeeee 1

h1 2 h2 3 h3 4
1 5 2 6 3 7
4 8 5 9 6 10
7 11 8 12 9 13

After table14

Footnotes

Footnotes

  1. t0 

  2. h1 

  3. h2 

  4. h3 

  5. c1 

  6. c2 

  7. c3 

  8. c4 

  9. c5 

  10. c6 

  11. c7 

  12. c8 

  13. c9 

  14. t1 

Actual behavior

Before tableeeeeeeeeee t0

h1 h1 h2 h2 h3 h3
1 c1 2 c2 3 c3
4 c4 5 c5 6 c6
7 c7 8 c8 9 c9

After tablet1


  1. t0
  2. c9
  3. c8
  4. c7
  5. c6
  6. c5
  7. c4
  8. c3
  9. c2
  10. c1
  11. h3
  12. h2
  13. h1
  14. t1

The point is that the footnote order inside table is reversed :/

Runtime

Other (please specify in steps to reproduce)

Package manager

npm 8

OS

macOS

Build and bundle tools

Vite

Table with long cell contents not properly rendered (we should not pad forever)

Initial checklist

Affected packages and versions

remark-gfm

Link to runnable example

https://codesandbox.io/s/quiet-shape-cinj8j?file=/src/index.js

Steps to reproduce

Create a table with longer cell contents:

| A table | With another Column |
| :--- | ---: |
| Some | Content |
| Some | Super long cell content, can we handle it? or will it break? yes, multi-line just works, too? |

Pipe it through remark -> remark-gfm -> remark-stringify.

Expected behavior

After stringification the markdown remains readable, focused on these columns that are not superlong:

| A table | With another Column |
| :------ | ------------------: |
| Some    |             Content |
| Some    | Super long cell content, can we handle it? or will it break? yes, multi-line just works, too? |

Actual behavior

See that table is rendered unreadable (normal padding takes place):

| A table |                                                                           With another Column |
| :------ | --------------------------------------------------------------------------------------------: |
| Some    |                                                                                       Content |
| Some    | Super long cell content, can we handle it? or will it break? yes, multi-line just works, too? |

Runtime

Node v16

Package manager

npm 8

OS

Linux

Build and bundle tools

Other (please specify in steps to reproduce)

Tildes in link URLs being escaped

Initial checklist

Affected packages and versions

3.0.1 and earlier

Link to runnable example

https://codesandbox.io/s/late-architecture-btzgc4?file=/src/index.js

Steps to reproduce

Configure remark to use remark-gfm and process a Markdown file containing for example:

[link text](https://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm)
<https://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm>

It will be written as:

[link text](https://www.ics.uci.edu/\~fielding/pubs/dissertation/rest_arch_style.htm)
<https://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm>

Note that the tilde in the first link URL is escaped, which does not hapen without remark-gfm. In the autolink, the tilde is not being escaped.

This is an issue for us, because on https://stoplight.io/ we sometimes have to create links that look like:

[retrieving pass](/reference/uitpas.json/paths/~1passes~1{uitpasNumber}/get)

This is a link to a specific operation inside an OpenAPI file, which Stoplight replaces with a permalink that they generate for the endpoint before converting the Markdown to HTML. However this conversion to a permalink does not work correctly when the tildes are escaped, and the link won't work.

Expected behavior

Tildes in link URLs are never escaped.

Actual behavior

Tildes in resource links are being escaped.

Runtime

No response

Package manager

No response

OS

No response

Build and bundle tools

No response

Performance issues with large data.

Initial checklist

Affected packages and versions

3.0.1

Link to runnable example

No response

Steps to reproduce

I'm using ReactMarkdown and included remarkGfm as remarkPlugins.
This is the markdown content i'm using.
markdown.txt

Expected behavior

It's should not causing any lagging.

Actual behavior

It's causing lagging and in mobile device it's cannot load.

Runtime

Node v16

Package manager

npm 8

OS

macOS

Build and bundle tools

Webpack

Bold and strikethrough do not work when it's not an isolated word and has punctuation inside

Subject of the issue

Bold (**) and strikethrought (~~) sometimes won't work properly when:

  • It is a non-isolated word.
  • There are (unicode) punctuation at the beginning or the end of the word inside ** / ~~

Your environment

  • OS: macOS 10.14.6
  • Packages:
    • remark 13.0.0
    • remark-gfm 1.0.0
    • remark-html 13.0.1
  • Env:
    • node 16.5.0
    • npm 7.19.1

Steps to reproduce

test.md:

测试~~(删除线)~~

测试 ~~(删除线)~~

Test~~(StrikeThrough)~~

测试,**粗体。**字符。

测试,**粗体。** 字符。

Test,**bold.**Character.

test.mjs

import remark from 'remark'
import gfm from 'remark-gfm'
import html from 'remark-html'
import fs from 'fs'

remark().use(gfm).use(html).process(fs.readFileSync("./test.md")).then(v => console.log(v.contents))

and node test.mjs

Expected behavior

It outputs:

<p>测试<del>(删除线)</del></p>
<p>测试 <del>(删除线)</del></p>
<p>Test<del>(StrikeThrough)</del></p>
<p>测试,<strong>粗体。</strong>字符。</p>
<p>测试,<strong>粗体。</strong> 字符。</p>
<p>Test,<strong>bold.</strong>Character.</p>

Actual behavior

<p>测试~~(删除线)~~</p>
<p>测试 <del>(删除线)</del></p>
<p>Test~~(StrikeThrough)~~</p>
<p>测试,**粗体。**字符。</p>
<p>测试,<strong>粗体。</strong> 字符。</p>
<p>Test,**bold.**Character.</p>

HTML blocks inside table cells not treated as blocks

HTML inside table cells is not parsed as expected.

In the minimum example below, I expect to have this node:

    {
      type: 'html',
      value: '<div>Test<i>foo</i></div>',
      position: ...
    }

as a child of a tableCell node. Instead, I get:

{
  type: 'tableCell',
  children: [
    { type: 'html', value: '<div>', position: [Object] },
    { type: 'text', value: 'Test', position: [Object] },
    { type: 'html', value: '<i>', position: [Object] },
    { type: 'text', value: 'foo', position: [Object] },
    { type: 'html', value: '</i>', position: [Object] },
    { type: 'html', value: '</div>', position: [Object] }
  ],
  position: ...
}

Minimal example:

var unified = require('unified')
var remarkParse = require('remark-parse')
var remarkGfm = require('remark-gfm')

var processor = unified()
    .use(remarkParse)
    .use(remarkGfm)


const text = '\nParameter | Default \n --------- | ------- \n  <div>Test<i>foo</i></div> | value \n';

const root = processor.parse(text);

function descend(tree) {
    console.log(tree);
    if (tree.children) {
        tree.children.map(item => descend(item));
    }
}

descend(root)

Your environment

  • OS: Mac
  • Packages:
    "remark-parse": "^9.0.0"
    "remark-gfm": "^1.0.0"
  • Env: node 14

Disable autolink

Some url text rendered to link incorrect,the text after url will included to the link, how to disable autolink?

Autolink bug

Subject of the issue

Here's the markdown text:

Please use relative URLs (/concepts/mode/) to link our own content instead of absolute URLs (https://webpack.js.org/concepts/mode/).

It renders into:

<p>Please use relative URLs (/concepts/mode/) to link our own content instead of absolute URLs (<a href="https://webpack.js.org/concepts/mode/)">https://webpack.js.org/concepts/mode/)</a>.</p>

As you can see, there's a superfluous ) at the end of href of the a element.

Steps to reproduce

Here's the code to run:

var vfile = require('to-vfile')
var report = require('vfile-reporter')
var unified = require('unified')
var parse = require('remark-parse')
var gfm = require('remark-gfm')
var remark2rehype = require('remark-rehype')
var stringify = require('rehype-stringify')

unified()
  .use(parse)
  .use(gfm)
  .use(remark2rehype)
  .use(stringify)
  .process(`Please use relative URLs (/concepts/mode/) to link our own content instead of absolute URLs (https://webpack.js.org/concepts/mode/).`, function (err, file) {
    console.error(report(err || file))
    console.log(String(file))
  })

Expected behavior

No superfluous ) at the end of href.

Actual behavior

Superfluous ) included in href.

PS

You can see how github renders the markdown below:

Please use relative URLs (/concepts/mode/) to link our own content instead of absolute URLs (https://webpack.js.org/concepts/mode/).

customize element used for strike-throughs

Customize element used for strike-throughs

In html, there are two elements for a strike-through. The <s> element denotes text which isn't applicable anymore (mdn). The <del> element is for document edits (mdn). Either use-case might apply with an input of ~~text~~.

Problem

This plugin currently produces <del> elements. I'm coming from markdown-it, and they use the <s> element for gfm strike-throughs. The <s> element seems to have a more general use-case, anyways. The example in the GFM spec is a <del> element, and that seems to be what the GitHub website uses.

Expected behavior

Expose an option which allows the user to choose between the <s> and <del> elements.

Alternatives

Just throwing it out there: single tildes are not part of the GFM spec. Once we're changing things up, we could make single tildes become <s> elements and keep double tildes the way they are.

id and anchor of footnote do not match with rehype-sanitize

Initial checklist

Affected packages and versions

3.0.1

Link to runnable example

No response

Steps to reproduce

import ReactMarkdown from 'react-markdown';
import remarkGfm from 'remark-gfm';
import rehypeSanitize from 'rehype-sanitize';

export type ViewerProps = {
  content: string;
};

const Viewer: FC<ViewerProps> = ({ content }: ViewerProps) => {
  return (
    <ReactMarkdown
      remarkPlugins={[remarkGfm]}
      rehypePlugins={[rehypeSanitize]}
    >
      {content}
    </ReactMarkdown>
  );
};

Expected behavior

<a href="#user-content-fn1" id="user-content-fnref1"><sup>1</sup></a>

...

<li id="user-content-fn1">footnote...<a href="#user-content-fnref1"></a></li>

Actual behavior

do not match with rehype-sanitize

<a href="#fn1" id="user-content-fnref1"><sup>1</sup></a>

...

<li id="user-content-fn1">footnote...<a href="#fnref1"></a></li>

Another result using rehype-react instead of react-markdown

id="user-content-user-content-fnref-1"

<a href="#user-content-fn-1" id="user-content-user-content-fnref-1" aria-describedby="footnote-label">1</a>

...

<li id="user-content-user-content-fn-1">
<p>footnote... <a href="#user-content-fnref-1" aria-label="Back to content"></a></p>
</li>

Runtime

Node v14, Electron

Package manager

yarn v1

OS

macOS

Build and bundle tools

Create React App

Checklist Failure (type="checkbox\")

Initial checklist

Affected packages and versions

rehype-format: ^4.0.0, rehype-raw: ^6.1.0, rehype-stringify: ^9.0.2, remark-gfm: ^2.0.0, remark-parse: ^10.0.0, remark-rehype: ^9.0.0, unified: ^10.1.0

Link to runnable example

No response

Steps to reproduce

Input Markdown

- [x] Some Text

Library Method

import rehypeFormat from 'rehype-format'
import rehypeRaw from 'rehype-raw'
import rehypeStringify from 'rehype-stringify'
import remarkGfm from 'remark-gfm'
import remarkParse from 'remark-parse'
import remarkRehype from 'remark-rehype'
import { unified } from 'unified'

async function render(
  markdown: string
): Promise<string> {
  const result = await unified()
    .use(remarkParse)
    .use(remarkGfm)
    .use(remarkRehype, { allowDangerousHtml: true })
    .use(rehypeRaw)
    .use(rehypeFormat)
    .use(rehypeStringify, {
      quoteSmart:       true,
      closeSelfClosing: true,
      omitOptionalTags: true,
      entities:         { useShortestReferences: true }
    })
    .process(markdown)

  return result.toString()
}

export default render
import fs from 'fs'
import { join } from 'path'

const docsDirectory = join(process.cwd(), 'docs')

export function getRawDocBySlug(slug: string): [string, string] {
  const realSlug = slug.replace(/\.mdx$/, '')
  const fullPath = join(docsDirectory, `${realSlug}.mdx`)
  const fileContents = fs.readFileSync(fullPath, 'utf8')

  return [realSlug, fileContents]
}

Usage

const DangerousMarkdown: FC<{ params: { slug: string } }> = ({ params }) => {
  const [slug, content] = getRawDocBySlug(params.slug)
  return <>
    <h1>{slug}</h1>
    <article dangerouslySetInnerHTML={{ __html: content }} />
  </>
}

Expected behavior

<h1>foo</h1>
<article>
<ul class="contains-task-list">
  <li class="task-list-item">
    <input checked="" disabled="" type="checkbox"> Some Text
  </li>
</ul>
</article>

Actual behavior

<h1>foo</h1>
<article>
<ul class="contains-task-list">
  <li class="task-list-item">
    <input checked="" disabled="" type="checkbox/"> Some Text
  </li>
</ul>
</article>

Runtime

Node v16

Package manager

yarn v2

OS

Linux

Build and bundle tools

Next.js

Lazy blockquote does not work

Subject of the issue

Lazy blockquote does not work on react-markdown if this plugin is applied.

Your environment

  • OS: Windows 10
  • Packages: react-markdown 5.0.3, remark-gfm 1.0.0
  • Env: React v17.0.2

Steps to reproduce

Use below markdown text.

Markdown allows you to be lazy and only put the `>` before the first
line of a hard-wrapped paragraph:

> This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.

> Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
id sem consectetuer libero luctus adipiscing.

Expected behavior

image

Actual behavior

image

Footnotes in tables are listed in the wrong order

Initial checklist

Affected packages and versions

Tested with MDX v1/v2 playground + remark-gfm enabled

Link to runnable example

No response

Steps to reproduce

Consider this code:

Before table[^t0]

| h1 [^h1] | h2 [^h2] | h3 [^h3] |
| --- | --- | --- |
| 1 [^c1] | 2 [^c2] | 3 [^c3] | 
| 4 [^c4] | 5 [^c5] | 6 [^c6] |
| 7 [^c7] | 8 [^c8] | 9 [^c9] |

After table[^t1]

[^t0]: t0
[^h1]: h1
[^h2]: h2
[^h3]: h3
[^c1]: c1
[^c2]: c2
[^c3]: c3
[^c4]: c4
[^c5]: c5
[^c6]: c6
[^c7]: c7
[^c8]: c8
[^c9]: c9
[^t1]: t1

This is tested in MDX v1 playground, v2 playground, and Docusaurus which uses MDX v1. I've selected "other" in the environment because it's most easily reproduced in the playgrounds.

Expected behavior

How GH renders it:

Before table1

h1 2 h2 3 h3 4
1 5 2 6 3 7
4 8 5 9 6 10
7 11 8 12 9 13

After table14

Actual behavior

In the MDX v2 playground (which I presume uses the latest versions of the dependencies):

  1. t0
  2. h3
  3. h2
  4. h1
  5. c3
  6. c2
  7. c1
  8. c6
  9. c5
  10. c4
  11. c9
  12. c8
  13. c7
  14. t1

p.s. this issue was first discovered in Docusaurus which uses MDX v1, which seems to include things like remark-footnotes by default. Interestingly, in v1 the footnotes are resolved in yet another order:

  1. t0
  2. c9
  3. c8
  4. c7
  5. c6
  6. c5
  7. c4
  8. c3
  9. c2
  10. c1
  11. h3
  12. h2
  13. h1
  14. t1

Runtime

Node v17, Other (please specify in steps to reproduce)

Package manager

yarn v1, Other (please specify in steps to reproduce)

OS

macOS, Other (please specify in steps to reproduce)

Build and bundle tools

Docusaurus, Other (please specify in steps to reproduce)

Footnotes

  1. t0

  2. h1

  3. h2

  4. h3

  5. c1

  6. c2

  7. c3

  8. c4

  9. c5

  10. c6

  11. c7

  12. c8

  13. c9

  14. t1

Footnote doesn't seem working

Initial checklist

Affected packages and versions

"remark-gfm": "^3.0.1"

Link to runnable example

No response

Steps to reproduce

Try accessing codesandbox: https://codesandbox.io/s/silent-smoke-8l4m7p?file=/src/app.tsx

  • from sandbox, comment out footnote to remove errors, from app.tsx

Or,

Using npm 9.2.0

  1. Install "remark-gfm": "^3.0.1"
  2. Try adding footnote, such as one below (which is straight from the sample):
## Footnote

A note[^1]

[^1]: Big note.

Expected behavior

Should display footnote.

Actual behavior

  • Error from codesandbox, and
  • Unexpected CSS behavior from my react local environment when embedded within React container, as shown below:
    image

Runtime

Node v14

Package manager

Other (please specify in steps to reproduce)

OS

Windows

Build and bundle tools

Create React App

Indented lines with 4 or more spaces in list are interpreted as code blocks

Subject of the issue

I'm upgrading remark-parse from 8.0.3 to 9.0.0 and using remark-gfm.

I found that the following indented list items example from CommonMark / GFM specs yields a different result from the specs.

- a
 - b
  - c
   - d
    - e

I don't think the package should be 100% spec compliant, and I'm sorry if it's actually working as intended.

Your environment

Steps to reproduce

See https://codesandbox.io/s/charming-dew-m14g7?file=/src/index.js

Expected behavior

As the specs say:

<ul>
<li>a</li>
<li>b</li>
<li>c</li>
<li>d
- e</li>
</ul>

Actual behavior

<ul>
<li>a</li>
<li>b</li>
<li>c</li>
<li>d</li>
</ul>
<pre><code>- e
</code></pre> 

Without remark-gfm, it works as expected.

The next example in the spec shows a result like this, but it's because there is a blank line before 3. c.

Add information about required CSS to the README

Initial checklist

Problem

While trying to use this package, I noticed that none of the expected GitHub styling was being applied to my markdown. I thought that the issue potentially was some styling inherited from the fact that my app uses Material UI. After doing some inspecting of my rendered markdown versus the example from the react-markdown repo, I realized I hadn't even checked if there was any CSS that the example was using. There was! I'm still a novice in terms of web development and had assumed that this package would manage the styling. While the HTML was ready for styling, there was no CSS to apply to it and I spent a long amount of time just to figure that out.

Naturally, after already figuring this out, I encounter this helpful comment and this note from the remark-rehype repo. Such is life, I suppose. 😅

Solution

To make this package a little more accessible, I'd like to propose adding a small section to the README.md which makes it clear that this package produces HTML that is ready for styling but requires user-provided CSS to do so. This would use language similar to that in the rehype-katex README's CSS section. I'd happily make a pull request to make this happen.

Alternatives

If adding this info directly to the README.md is undesirable and the maintainers feel it exceeds the scope of the document or makes it longer than necessary, a troubleshooting document could be made with common pitfalls, like the one I fell in, and their solutions.

Links with "https://" in link text not properly parsed

Subject of the issue

When using the remark-gfm plugin, certain links are misparsed. Without the plugin, links are always parse properly. Plugging the breaking input into github.com's Preview results in the expected correct parsing behavior. See below for an example.

Your environment

Steps to reproduce

With the following input

import gfm from 'remark-gfm'
import ReactMarkdown from 'react-markdown'
/*...*/
<ReactMarkdown plugins={[gfm]} source="[https://google.com](https://google.com)"/>

the link is parsed such that the link callback has an odd href attribute of

https://google.com](https://google.com)

I checked, and that source is parsed as expected by github.com. If instead I use the following source, the link is now parsed properly by react-markdown:

[google.com](https://google.com)

And if i remove the gfm plugin, then both source are parsed properly.

Expected behavior

remark-gfm should not affect link parsing

Actual behavior

Link parsing seems to break when using remark-gfm.

Option for Autolinking Phone Numbers

Initial checklist

Problem

remark-gfm offers autolinking of URL literals (ie: https://xxx) but not phone numbers

Solution

Add option to remark-gfm to autolink phone numbers in addition to URLs

Alternatives

Because this project is focused on GitHub flavored markdown, perhaps this is better suited for a separate plugin (discussion topic here)

Returns invalid attributes in tr/td elements

Initial checklist

Affected packages and versions

[email protected]

Link to runnable example

No response

Steps to reproduce

Run the example.js file in the README with the example.md in the README as input.

Expected behavior

Output should match the output shown in the README.

Actual behavior

The output for the table has align="none" attribute showing up. This appears to be an interoperability issue between rehypeStringify and remark-gfm (and really the underlying micromark-extension-gfm-table and hast-util-to-html modules).

align="none" is not valid, or at least that's my reading of https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-align. Regardless, align is deprecated and I think the right thing to do here is omit it (which is what the example output does).

Here's the output I get:

<h1>GFM</h1>
<h2>Autolink literals</h2>
<p><a href="http://www.example.com">www.example.com</a>, <a href="https://example.com">https://example.com</a>, and <a href="mailto:[email protected]">[email protected]</a>.</p>
<h2>Footnote</h2>
<p>A note<sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref aria-describedby="footnote-label">1</a></sup></p>
<h2>Strikethrough</h2>
<p><del>one</del> or <del>two</del> tildes.</p>
<h2>Table</h2>
<table>
<thead>
<tr>
<th align="none">a</th>
<th align="left">b</th>
<th align="right">c</th>
<th align="center">d</th>
</tr>
</thead>
</table>
<h2>Tasklist</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" disabled> to do</li>
<li class="task-list-item"><input type="checkbox" checked disabled> done</li>
</ul>
<section data-footnotes class="footnotes"><h2 id="footnote-label" class="sr-only">Footnotes</h2>
<ol>
<li id="user-content-fn-1">
<p>Big note. <a href="#user-content-fnref-1" data-footnote-backref class="data-footnote-backref" aria-label="Back to content">↩</a></p>
</li>
</ol>
</section>

Runtime

Node v17

Package manager

npm v7

OS

macOS

Build and bundle tools

No response

New Feature: support for task lists inside tables

Initial checklist

Problem

At the moment remark-gfm doesn't support task lists inside tables, but GitHub does. Try the following code in GitHub:

| Complete | Description | Units |
| --- | ----------- | --- |
| <ul><li>- [ ] </li></ul> | DB read I/O | int |
| <ul><li>- [ ] </li></ul> | DB write I/O | int |
| <ul><li>- [ ] </li></ul> | DB Read Latency | ms |
| <ul><li>- [ ] </li></ul> | DB Write Latency | ms |
| <ul><li>- [ ] </li></ul> | DB total transactions | int |
| <ul><li>- [ ] </li></ul> | DB total rows updated | int |
| <ul><li>- [ ] </li></ul> | DB total rows deleted | int |
| <ul><li>- [ ] </li></ul> | DB total rows inserted | int |

Solution

Update remark-gfm so that - [] values are converted into checkboxes even if they are inside table cells.

Alternatives

Not sure

Nested bold, italics and strikethrough fails to parse on non-isolated words

Subject of the issue

Nesting either bold, italics or both with strike-through does not work when the wrapped word(s) are not isolated.

i.e. ***~~Hello~~***Hello should render with the first hello bolded, italicized and with strike-through, but it only renders the strike-through.

On github it renders correctly:

HelloHello

If the word is isolated, i.e. ***~~Hello~~*** Hello, then the styles are correctly applied.

Nesting of bold and italics alone works correctly.

Your environment

  • OS: MacOS Big Sur 11.3.1
  • Packages:
    "rehype-stringify": "8.0.0",
    "remark-gfm": "1.0.0",
    "remark-parse": "9.0.0",
    "remark-rehype": "8.1.0",
    "unified": "9.2.1"
  • Env: Node 14

Steps to reproduce

https://codesandbox.io/s/agitated-mclaren-bynw8?file=/src/index.js

Expected behavior

The nested word should have all styles applied.

Actual behavior

Only strike-through is applied.

GFM ESM error in Remix 💿

Initial checklist

Affected packages and versions

.0.1

Link to runnable example

No response

Steps to reproduce

  • Install reamrk-gfm via npm
  • import into a server component in Remix
  • Set as an XDM plugin
  • Run the app

Expected behavior

App works fine and the markdown to HTML process is happyThe app

Actual behavior

Error thrown

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: C:\Users\${user}\Documents\project\node_modules\remark-gfm\index.js
require() of ES modules is not supported.
require() of C:\Users\user\Documents\proj\node_modules\remark-gfm\index.js from C:\Users\user\Documents\proj\api\_build\index.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename C:\Users\user\Documents\project\node_modules\remark-gfm\index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from C:\Users\user\Documents\proj\node_modules\remark-gfm\package.json.

Runtime

Node v14

Package manager

npm 7

OS

Windows

Build and bundle tools

esbuild, Remix

Add options to selectively disable sub-plugins

Initial checklist

Problem

It would be useful to be able to disable some features of the GFM plugin.
use case could be: use all GFM features except the autolink literals.

Solution

allow disabling certain plugins with option:

const mdast = unified()
  .use(remark)
  .use(gfm, {
    autolink: false,
  })
  .parse(doc);

Alternatives

Create a custom plugin for remark-gfm and mdast-util-gfm that is more or less a copy of the original ones.

Table parse error when using vite

Initial checklist

Affected packages and versions

[email protected], [email protected]

Link to runnable example

https://stackblitz.com/edit/typescript-3aqowy?file=index.ts,index.html

Steps to reproduce

https://stackblitz.com/edit/typescript-3aqowy?file=index.ts,index.html

One interesting thing is that in codesandbox, everything works fine. Maybe it's related to bundle strategy for different types of modules?

Expected behavior

The table should be parsed as

| a  | b  | c  |
| :- | :- | :- |
| -- | -- | -- |
| 1  | -- | 3  |

Just one node in AST.

Actual behavior

\| a | b | c |

| :- | :- | :- |
| -- | -- | -- |
| 1 | -- | 3 |

There're two nodes, one paragraph, one table.

Runtime

Other (please specify in steps to reproduce)

Package manager

pnpm

OS

macOS

Build and bundle tools

Vite

Lazy list/blockquote breaks container w/ `remark-gfm`

Subject of the issue

With the remark-gfm plugin enabled, in a list indented with 4 characters, a HTML tag with a 3-character indent will split up the list.

Your environment

Happens on astexplorer.net too.

Steps to reproduce

1.  Hello
2.  World
   <br>Manual break!
3.  Ouch.

Expected behavior

No paragraph is generated, the list is entirely complete (as happens with the GFM plugin disabled).

Actual behavior

The <br> and onwards signal the end of the list, and entry 3. will be a plain text in a paragraph.

(edited by wooorm to fix markdown)

Table - remark-gfm is rendering an empty `<td />` element instead of not rendering it

Subject of the issue

I have some css for my tables, and one of my users had a space after some row in the table.
In Github it renders well. However, using react-markdown it looks weird (image below). Turns out that while Github ignores this space, in remark-gfm there's an added td element which makes the UI look weird in my case...
I think it's a bug since it doesn't align with how Github is rendering the table.

Your environment

  • Packages: react-markdown (version 5)

Steps to reproduce

Example in codesandbox.io:
https://codesandbox.io/s/react-markdown-forked-4hj01

Expected behavior

Should render the ordered list exactly like in Github:

hello... hi...
first cell second cell and last
first cell second cell and last

Notice the number of <td /> elements in the first row - it's two elements in Github, whereas in react-markdown with remark-gfm it's three.

Actual behavior

There's an excessive <td /> element which is empty.
This is the UI:
image

These are the HTML elements (the marked element is the redundant element):
image

<details> collapse is not supported

<details> not supported

Using of <details> tags in GFM is supposed to create collapse sections. By default this is not happening in react-markdown when gfm is added as a plugin, and I see no option to enable it.

Your environment

  • OS: MacOS
  • Packages: React-markdown

Steps to reproduce

  1. Add this section to markdown
<details>
<summary> Title</summary>

Main Section
</details>
  1. Add remark-gfm as react-markdown plugin

Codesandbox reproduction

Expected behavior

A collapsible should replace the <details> section

Actual behavior

<details content is rendered as escaped string.

Add option to control `Footnotes` label

Initial checklist

Problem

After generating the html I end up with an unwanted Footnotes label.
This doesn't support i18n, add an option to either change or turn this label off.

<h2>Footnotes (👈  add an option to change this)</h2>
<ol><li id="user-content-fn-1">
<p>This is a note<a class="data-footnote-backref" href="#user-content-fnref-1" data-footnote-backref="true" aria-label="Back to content">↩</a></p>
</li></ol>

Solution

Add support for the micromark-extension-gfm's options: label, backLabel, and clobberPrefix

Alternatives

N/A

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.