hexojs / hexojs/hexo-renderer-markdown-it

Some problems interpreting code ?!?

Open
#144 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
369
Forks
59
PR merge metrics
No merged PRs in 30d

Description

I just noticed on my website, [linked markdown](https://gist.githubusercontent.com/andretietz/2d54504084afb2a9b81ddc09cd24b3cc/raw/48e27e5d5dc5f25070e4d34a431276a67a7c5126/TEST.md) is not correctly interpreted into html. ([See website article with the problem.](https://andretietz.com/2020/10/09/custom-retrofit2-annotations/#ProxyCallAdapter))

Also, I noticed that every linebreak in markdown is translated into an html linebreak. Even though it shouldn't.
This is important for writing markdown, since at the moment I need to write every thing in a single line, which I don't want to have. This is part of the markdown definition:
* https://daringfireball.net/projects/markdown/syntax#p (two spaces + linebreak = linebreak)
* https://gist.github.com/shaunlebron/746476e6e7a4d698b373

Both of this problems are no parser(markdown-it) problems, [according to this](https://markdown-it.github.io/#md3=%7B%22source%22%3A%22%23%23%20ProxyCallAdapter%5CnAnd%20here%20the%20simple%20%60ProxyCallAdapter%60%20that%20doesn%27t%20do%20anything%20special%2C%20but%20records%20the%20request%20and%20it%27s%20annotation%20content%20into%20our%20map%2Fregistry.%20Everything%20else%20is%20Proxy%20functionality.%5Cn%60%60%60kotlin%5Cnclass%20ProxyCallAdapter%3CRETURN_TYPE%20%3A%20Any%3E%28%5Cn%20%20private%20val%20adapter%3A%20CallAdapter%3CAny%2C%20RETURN_TYPE%3E%2C%5Cn%20%20private%20val%20registration%3A%20MutableMap%3CInt%2C%20String%3E%2C%5Cn%20%20private%20val%20info%3A%20String%5Cn%29%20%3A%20CallAdapter%3CAny%2C%20RETURN_TYPE%3E%20%7B%5Cn%5Cn%20%20override%20fun%20responseType%28%29%3A%20Type%20%3D%20adapter.responseType%28%29%5Cn%5Cn%20%20override%20fun%20adapt%28call%3A%20Call%3CAny%3E%29%3A%20RETURN_TYPE%20%7B%5Cn%20%20%20%20registration%5BRequestIdentifier.identify%28call.request%28%29%29%5D%20%3D%20info%5Cn%20%20%20%20return%20adapter.adapt%28call%29%5Cn%20%20%7D%5Cn%7D%5Cn%60%60%60%20%5Cn%5Cn%23%23%20Manipulating%20the%20request%5CnWe%20still%20need%20to%20implement%20the%20%60Interceptor%60%2C%20which%20takes%20the%20information%20and%20manipulate%20the%20request.%20This%20now%20turns%5Cnout%20to%20be%20easy.%5Cn%5Cn%60%60%60kotlin%5Cnclass%20SomeCustomInterceptor%28private%20val%20registration%3A%20MutableMap%3CInt%2C%20String%3E%29%20%3A%20Interceptor%20%7B%5Cn%20%20override%20fun%20intercept%28chain%3A%20Interceptor.Chain%29%3A%20Response%20%7B%5Cn%20%20%20%20var%20request%20%3D%20chain.request%28%29%5Cn%20%20%20%20val%20annotationContent%20%3D%20registration%5BRequestIdentifier.identify%28request%29%5D%5Cn%20%20%20%20if%28annotationContent%20!%3D%20null%29%20%7B%5Cn%20%20%20%20%20%20request%20%3D%20chain.request%28%29.newBuilder%28%29%5Cn%20%20%20%20%20%20%20%20.addHeader%28%5C%22SomeCustomHeader%5C%22%2C%20annotationContent%29%5Cn%20%20%20%20%20%20%20%20.build%28%29%5Cn%20%20%20%20%7D%5Cn%20%20%20%20return%20chain.proceed%28request%29%5Cn%20%20%7D%5Cn%7D%5Cn%60%60%60%22%2C%22defaults%22%3A%7B%22html%22%3Atrue%2C%22xhtmlOut%22%3Afalse%2C%22breaks%22%3Afalse%2C%22langPrefix%22%3A%22language-%22%2C%22linkify%22%3Atrue%2C%22typographer%22%3Atrue%2C%22_highlight%22%3Atrue%2C%22_strict%22%3Afalse%2C%22_view%22%3A%22html%22%7D%7D)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.