Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Apply markdown engine to result provider #232

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
jdneo merged 8 commits into LeetCode-OpenSource:master from Vigilans:webview-md-result
Mar 27, 2019
Merged

Apply markdown engine to result provider #232

jdneo merged 8 commits into LeetCode-OpenSource:master from Vigilans:webview-md-result
Mar 27, 2019

Conversation

Copy link
Contributor

@Vigilans Vigilans commented Mar 23, 2019
edited
Loading

Introduction

Solving #216 (comment)

Demonstration

image

image

image

image

@Vigilans Vigilans requested a review from jdneo March 23, 2019 14:35
Copy link
Member

jdneo commented Mar 23, 2019

This pull request introduces 3 alerts when merging 4bb9018 into bcafa92 - view on LGTM.com

new alerts:

  • 2 for Useless assignment to local variable
  • 1 for Unused variable, import, function or class

Comment posted by LGTM.com

Copy link
Contributor Author

Currently, the parsing does not cover this case:
image

However, the [Warn] line will be parsed as one part of √ Your runtime..., so maybe its visual effect will not be so ugly.

If there is issue about it in the future, further logic can be added at that time.

return `<!DOCTYPE html>
<html lang="en">
private parseResult(raw: string): IResult {
raw = raw.concat(" √ "); // Append a dummy sentinel to the end of raw string
Copy link
Member

Choose a reason for hiding this comment

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

What will happen if we don't append ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The RegEx captures anything in between two . If we don't append it, the last section (normally stdout) won't be captured.

Worth to note that, with this trick, messages like [WARN] Failed to get memory percentile will be captured as one part of Your runtime beats 81.3 % of python submissions, and will also be printed out even it does not starts with .

Copy link
Member

Choose a reason for hiding this comment

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

Hmm... still feeling the logic here is too tricky for maintaince.

It's ok to merge for now.

@jdneo jdneo merged commit 4eefc70 into LeetCode-OpenSource:master Mar 27, 2019
@Vigilans Vigilans deleted the webview-md-result branch August 22, 2019 08:02
@Vigilans Vigilans restored the webview-md-result branch August 22, 2019 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@jdneo jdneo jdneo approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /