On Thu, Jun 28, 2018 at 9:07 AM, Chad Perrin <c...@apotheon.net> wrote:

> See if this makes sense:
>

> Apply syntax highlighting to a block of code.  Organize the code in
> second column TD elements of a table.  Organize line numbers in first
> column TD elements of a table.
>
> Thus, you would have HTML for a line of code that looks something like
> this (using a totally made-up function as example code):
>
>     <tr>
>       <td class="line-no">$num</td>
>       <td class="code-line">
>         <span class="color-type">uint16_t</span> <span
> class="color-label">get_next</span><span class="color-delim">() {</span>
>       </td>
>     </tr>
>
> Of course, that's just off the top of my head.  I don't actually know
> how the HTML resulting from application of the syntax highlighting code
> would look in this case.  The upshot, though, is that applying syntax
> highlighting to the code to be displayed first, then organizing it into
> table cells with number cells, might avoid JS syntax highlighting issues
> with line numbers, including any issues around multiline highlighting.
> The downside is that it would result in either having to do all line
> numbering in JS or applying syntax highlighting server-side.
>
>
As a target, I would suggest the emitted html look as much like this as
possible:

view-source:https://github.com/jvirkki/libbloom/blob/master/bloom.c

The actual code block begins at line 821.

This style of markup is a de-facto standard and leads to a linking style
that would
greatly aid migration from git if fossil could adhere to it.
_______________________________________________
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