mity / md4c

C Markdown parser. Fast. SAX-like interface. Compliant to CommonMark specification.
MIT License
776 stars 146 forks source link

Reddit slash links #32

Open jimmyjxiao opened 6 years ago

jimmyjxiao commented 6 years ago

This implements an option for Reddit subreddit and user links such as /r/test or r/test. Sorry about my complete lack of skill with git

codecov[bot] commented 6 years ago

Codecov Report

Merging #32 into master will decrease coverage by 0.03%. The diff coverage is 91.3%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #32      +/-   ##
==========================================
- Coverage   92.75%   92.71%   -0.04%     
==========================================
  Files           1        1              
  Lines        2525     2567      +42     
==========================================
+ Hits         2342     2380      +38     
- Misses        183      187       +4
Impacted Files Coverage Δ
md4c/md4c.c 92.71% <91.3%> (-0.04%) :arrow_down:

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 e0002e2...c959ac7. Read the comment docs.

jimmyjxiao commented 6 years ago

I think I've fixed most of your concerns, can you take another look?

mity commented 6 years ago

I think I've fixed most of your concerns, can you take another look?

There is yet the problem with the blank lines between lines 4010 and 4045 in the file md4c.c which were introduced somewhere in your branch so please fix that too.

I will yet do some tests which can take few days before merging it, but so far it seems in quite a good shape to me.

mity commented 6 years ago

There is yet another problem: The new tests did not run correctly. See https://travis-ci.org/mity/md4c/builds/326630844?utm_source=github_status&utm_medium=notification (you may need to open the triangle mark on line 553 of the log to see the output of the tests).

EDIT: The culprit is in scripts/run-tests.sh:

$PYTHON "$TEST_DIR/spec_tests.py" -s
"$TEST_DIR/reddit-autolinks.txt" -p "$PROGRAM --freddit-autolinks"

The end-of-line generally means end of command, so shell sees this as two commands, not one with more options. So concatenating the two lines should solve it.

jimmyjxiao commented 6 years ago

Alright, should be fixed