On 2018-06-28 08:12, Richard Hipp wrote:
Please mail in your CLA when you get a chance.

Sending later today, hopefully regular stamped mail won't take 2 weeks.

I've developed a way to do highlighting with line numbering...
The issues are as follows however:
1. The JS code responsible for the highlighting is external to Fossil itself.
2. The JS code highlights <pre><code> blocks, so if there is a
  `<pre><code>$line</code><code>$line2</code></pre>` each code block is
  highlighted individually.
3. Context is lost between code blocks.

Each line gets wrapped in a separate code block because you can use
css to insert a line number vs manually inserting the line number via
code per line.

That said, if you have a comment block `/* comments */` broken up over a
few lines, it won't apply the comment coloring to the lines in-between when line numbering is enabled. Thus, I'd consider that while it half works, such is inherently broken unless we decide to depend upon a certain JS library to handle highlighting. Highlightjs is compatible (BSD2 licensed) but I also could see that its probably unwanted to include yet more JS. I'm not sure
if line numbering shouldn't be shifted to a "up to the user" ordeal like
syntax highlighting was. That however means stripping away the "?ln" query capabilities. I'm unsure how this situation would best be handled, because as it is, syntax highlighting works, doesn't work with line numbering, and likely cannot work with line numbering without bringing in something as a
dependency and depending on it to handle the line numbering for us.

All that said... what I did was more a proof of concept with the line
numbering syntax highlighting and even "?ln" query capabilities went
untested when I first noticed the loss of context issue and figured that
it would be best to figure out what trade offs should be made to be able
to highlight whilst displaying numbers or if the trade off is to not be
highlight capable when numbers are displayed.

--
Lester L. Martin II
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to