-
Notifications
You must be signed in to change notification settings - Fork 29
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
Multiline comment formatting broken by table #78
Comments
Too much day job pressure to get this the head-space it deserves but your overall approach does seem like it will bear fruit. If you can get it to fly we can see what if any collateral damage this produces. I have some hope that we can integrate this. (Crikey how's that for a mixed metaphor? I imagine flying fruit trees would produce quite a lot of collateral damage!) |
Sorry, also been a bit busy lately. The fix I implemented above leads to code wrapping not being properly indented and also to manually set the column width for the line numbers. I think the second issue is fixable (possibly by adding a hidden "000" to each line number span) but the first one is a bit of a dealbreaker - I can't think of a fix besides adding JavaScript to find the wrapping locations and manually add in indentation. What may be better is simply finding all instances of span tags that wrap across multiple lines and adding in extra ones, which is what's done e.g. here - I can try to do something like that instead. |
I've been pretty busy too. Are you having any success? I've had a new feature by PR and closed a bug myself (poor initial stylesheet) so I'll be doing a release soon. I haven't yet updated the documentation so you do have some time. Do you think you are likely to get this sorted in the next week or so? |
Yeah, I have some free time finally - I'll try to put something together, should be doable in the next few days. |
Should be fixed by #85. |
Multiline comments aren't displayed properly, e.g.:
The produced markup looks like:
I believe the issue is that highlightjs adds the span with class
hljs-string
, but since the text which is inside the class contains newlines the text naturally gets split across table trs. As a result, the span tag gets split across multiple lines, which leads to invalid markup (tags not nested) and the wrong output. This probably affects multiline strings as well.I did a quick fix of this issue by using pre and span for whitespace formatting and line numbering instead of tables. The resulting markup is:
Since lines aren't contained inside their own tags, the resulting markup is valid. This is a pretty big change that might break a bunch of other stuff, but if this seems like a good direction I can submit a PR.
The text was updated successfully, but these errors were encountered: