-
Notifications
You must be signed in to change notification settings - Fork 56
Tutorial extra empty line bug #662
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
Labels
bug
Something isn't working
Comments
Looks like this is a bug in the implementation of highlightContent in const result = getLines(element.innerHTML)
.reduce((all, lineText) => `${all}<span class="${className}">${lineText || '\n\n'}</span>\n`, ''); This question can turn into this js issue: var a = ['/*', 'S', '', 'A', '*/']
var className = "syntax-comment"
const result = a
.reduce((all, lineText) => `${all}<span class="${className}">${lineText || '\n\n'}</span>\n`, '');
console.log(result)
|
3 tasks
3 tasks
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Extra line is render for code in tutorial.
Checklist
main
branch of this package.Expected Behavior
Show the correct highlighting for Line 25-29
Actual behavior
Show the wrong highlighting (Due to extra empty line on Line 4 and Line 5).
There should be only 1 empty line (Line 3). Currently there will be 3 empty line(Line 3 - Line 5)
Steps To Reproduce
The tutorial resource can be downloaded from https://developer.apple.com/documentation/xcode/slothcreator_building_docc_documentation_in_xcode
Swift-DocC-Render Version Information
No response
The text was updated successfully, but these errors were encountered: