Skip to content
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

Additional Features #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

llmII
Copy link

@llmII llmII commented Jul 5, 2018

Worked on this over a week ago.

Additional features include the following:

  • Line linking.
  • Selection Linking.
  • Multiple Selection linking.
  • Scroll to top selection by link.

This was written specifically to get line numbering and syntax highlighting working
with Fossil (an alternative to git)
. However, the changes should be generally useful
otherwise. Can work on the pull request further to make it further compatible as
needed.

For an example of how it works, go to https://code.amlegion.org/hljs_line_numbers
For a full commit history same link as above.

Ask questions and let me know if further work is needed to progress this.

Fossil repo: https://code.amlegion.org/hljs_line_numbers
Adds: line linking, selection links, multi-selection links, scroll to top
  line in link.
@llmII
Copy link
Author

llmII commented Jul 5, 2018

Note:
Also fixes displaying "{1}" on empty lines for some languages
(though probably should have been fixed via the format function
instead of a quick hack elsewhere).

@llmII
Copy link
Author

llmII commented Jul 5, 2018

#7 is fixed with this as well.

@clach04
Copy link
Contributor

clach04 commented Dec 31, 2021

@llmII do you still have an example around for this? The link current 404s. I took at look at the other projects hosted (in fossil) but it wasn't clear synax highlighting was available when viewing code (e.g. https://code.amlegion.org/jlogger/file?name=logging/log.lua&ci=tip ). Thanks!

@llmII
Copy link
Author

llmII commented Dec 31, 2021

@clach04 look at simplelog.lua. It has syntax highlighting and line numbers (per that link).

We are no longer using highlightjs-line-numbers for this as there's builtin ways to do this with fossil now and I'd have to create a new patch to regain compatibility with the pull request here that is now incompatible with upstream.

I'm happy to help in relation to the fossil/highlighting setup, though we'd need to establish a way to contact each other (maybe look at one of our projects, might list a way to contact me).

The reason you don't see highlighting with jlogger is because it's in the Janet programming language and I'd either have to tweak my hljs to pretend janet files are clojure files or find a syntax highlighter that exists for janet in hljs and I haven't found it necessary to do so at this point in time.

@clach04
Copy link
Contributor

clach04 commented Dec 31, 2021

thanks for the speed response @llmII! My interest was more in highlightjs-line-numbers than Fossil.

I'll make time to play with this from your fork :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants