镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

fix paragraph type - #1248

Merged
joshbruce merged 4 commits into
markedjs:masterfrom
UziTech:paragraph-type
May 2, 2018
Merged

joshbruce merged 4 commits into
markedjs:masterfrom
UziTech:paragraph-type

Conversation

@UziTech

@UziTech UziTech commented May 2, 2018 •

Copy link
Copy Markdown
Member

Marked version: 37c0324

Description

Contributor

  • Test(s) exist to ensure functionality and minimize regression (if no tests added, list tests covering this PR)

Committer

In most cases, this should be a different person than the contributor.

  • Draft GitHub release notes have been updated.
  • CI is green (no forced merge required).
  • Merge PR

@UziTech

UziTech commented May 2, 2018

Copy link
Copy Markdown
Member Author

@davisjam not sure if this makes the paragraph regex vulnerable. It doesn't looks like the eslint plugin marked it as vulnerable.

@UziTech
UziTech requested review from davisjam, joshbruce and styfle May 2, 2018 13:54
@UziTech UziTech changed the title [wip] fix paragraph type fix paragraph type May 2, 2018
Comment thread test/specs/original/specs-spec.js Outdated

const tokens = marked.lexer(md);

expect(tokens[0].type).toBe('paragraph');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think this makes more sense to be in the unit tests, yeah? The construction seems similar enough and this isn't, technically speaking, checking a specific spec or the output as a whole.

@davisjam

davisjam commented May 2, 2018

Copy link
Copy Markdown
Contributor

@UziTech Looks OK.

Comment thread test/unit/marked-spec.js
marked.parse('Hello World!');
expect(marked.parse).toHaveBeenCalled();
});

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed this test as well since it didn't really do anything. and was just there initially to have a test

@joshbruce

joshbruce commented May 2, 2018 •

Copy link
Copy Markdown
Member

@UziTech - looks like - is this a false positive in security check? The regexes don't seem to match what was changed.

@UziTech

UziTech commented May 2, 2018

Copy link
Copy Markdown
Member Author

travis is just hung up on the security scan. this PR is good to go

zhenalexfan pushed a commit to zhenalexfan/MarkdownHan that referenced this pull request Nov 8, 2021
zhenalexfan pushed a commit to zhenalexfan/MarkdownHan that referenced this pull request Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants