Skip to content
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

add support for markdown #50

Merged
merged 6 commits into from
Oct 12, 2021
Merged

Conversation

vinmaster
Copy link
Contributor

Closes #20

@vinmaster
Copy link
Contributor Author

The test passes locally, not sure why it returns as object


test('heading 1', () => {
const code = detectLang('# Heading level 1');
assert.equal(code, 'Markdown');
Copy link
Member

Choose a reason for hiding this comment

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

please pull latest origin and change every assert.equal(code, 'Markdown') to assert.equal(code.language, 'Markdown')

Copy link
Member

Choose a reason for hiding this comment

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

also can you please add more of a real-world markdown code? you can make your own or grab one online. thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've fixed the tests and added more. It's hard not to have conflict because markdown can catch comments of all the other languages

@codecov
Copy link

codecov bot commented Oct 8, 2021

Codecov Report

Merging #50 (5cca8e9) into master (11e7a24) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #50   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           23        24    +1     
  Lines          852       880   +28     
  Branches        43        43           
=========================================
+ Hits           852       880   +28     
Impacted Files Coverage Δ
src/index.ts 100.00% <100.00%> (ø)
src/languages/markdown.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 11e7a24...5cca8e9. Read the comment docs.

@vinmaster vinmaster requested a review from aldy505 October 8, 2021 06:35
@aldy505
Copy link
Member

aldy505 commented Oct 8, 2021

About the skipped tests, can you replace those with a working test cases?

Here's a few that I found on Github:

Thanks a lot

@vinmaster
Copy link
Contributor Author

I've made the changes requested. Let me know if more work is needed. Thanks

@aldy505 aldy505 merged commit 20ff9c6 into teknologi-umum:master Oct 12, 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.

new language: Markdown
3 participants