-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Display filename in codeblock (resend) #1533
Display filename in codeblock (resend) #1533
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks you for your contribution.
please confirm my reviews!
browser/lib/markdown.js
Outdated
@@ -25,14 +26,21 @@ var md = markdownit({ | |||
xhtmlOut: true, | |||
breaks: true, | |||
highlight: function (str, lang) { | |||
let delimiter = ":"; | |||
let langinfo = lang.split(delimiter); | |||
let lang = langinfo[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duplicate declaration lang
browser/lib/markdown.js
Outdated
@@ -25,14 +26,21 @@ var md = markdownit({ | |||
xhtmlOut: true, | |||
breaks: true, | |||
highlight: function (str, lang) { | |||
let delimiter = ":"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please follow eslintrc
Sorry. I've followed eslintrc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
! Please reject my former pull request !
I've added a feature displaying file name in code block.
Additionally, I made it possible to define any first line number.
The notation is as follows.
Example:
If you don't write file name and line number, it behaves originally.