Merge pull request #505 from sbcgua/master

XML highlighting, faster abap highlighting
This commit is contained in:
Lars Hvam 2016-12-16 08:49:33 +01:00 committed by GitHub
commit cffb3d2725
3 changed files with 851 additions and 373 deletions

View File

@ -503,6 +503,9 @@ table.diff_tab code {
table.diff_tab code span.keyword { color: #0a69ce; }
table.diff_tab code span.text { color: #48ce4f; }
table.diff_tab code span.comment { color: #808080; font-style: italic; }
table.diff_tab code span.xml_tag { color: #3370e0; }
table.diff_tab code span.attr { color: #f20707; }
table.diff_tab code span.attr_val { color: #7a02f9; }
table.diff_tab tbody tr:first-child td { padding-top: 0.5em; }
table.diff_tab tbody tr:last-child td { padding-bottom: 0.5em; }

View File

@ -255,24 +255,21 @@ CLASS lcl_gui_page_diff IMPLEMENTATION.
METHOD render_lines.
DATA: lo_highlighter TYPE REF TO lcl_code_highlighter,
DATA: lo_highlighter TYPE REF TO lcl_syntax_highlighter,
lt_diffs TYPE lcl_diff=>ty_diffs_tt,
lv_local TYPE string,
lv_remote TYPE string,
lv_lattr TYPE string,
lv_rattr TYPE string,
lv_highlight TYPE abap_bool,
lv_insert_nav TYPE abap_bool.
FIELD-SYMBOLS <ls_diff> LIKE LINE OF lt_diffs.
CREATE OBJECT lo_highlighter.
lo_highlighter = lcl_syntax_highlighter=>create( is_diff-filename ).
CREATE OBJECT ro_html.
lt_diffs = is_diff-o_diff->get( ).
lv_highlight = boolc( is_diff-filename CP '*.abap' ).
LOOP AT lt_diffs ASSIGNING <ls_diff>.
IF <ls_diff>-short = abap_false.
lv_insert_nav = abap_true.
@ -292,7 +289,7 @@ CLASS lcl_gui_page_diff IMPLEMENTATION.
lv_remote = <ls_diff>-old.
ENDIF.
IF lv_highlight = abap_true.
IF lo_highlighter IS BOUND.
lv_local = lo_highlighter->process_line( lv_local ).
lv_remote = lo_highlighter->process_line( lv_remote ).
ELSE.

File diff suppressed because it is too large Load Diff