Made headings link to themselves.
Made each heading link to itself, by placing an <a> tag inside each <h[1-6]> tag. Also adds class="header" to each header, allowing for the CSS rule .header a { ... } to remove all styling from the inner links, allowing the outputed document to look like before.
This commit is contained in:
committed by
EinfachToll
parent
1cffbdbf3d
commit
bda3a59f91
@ -1072,7 +1072,9 @@ function! s:process_tag_h(line, id)
|
||||
let h_text = num.' '.h_text
|
||||
endif
|
||||
let h_complete_id = s:escape_html_attribute(h_complete_id)
|
||||
let h_part = '<div id="'.h_complete_id.'"><h'.h_level.' id="'.h_id.'"'
|
||||
let h_part = '<div id="'.h_complete_id.'">'
|
||||
let h_part .= '<h'.h_level.' id="'.h_id.'" class="header">'
|
||||
let h_part .= '<a href="#'.h_complete_id.'"'
|
||||
|
||||
else
|
||||
|
||||
@ -1088,7 +1090,7 @@ function! s:process_tag_h(line, id)
|
||||
|
||||
let h_text = s:process_inline_tags(h_text, a:id)
|
||||
|
||||
let line = h_part.h_text.'</h'.h_level.'></div>'
|
||||
let line = h_part.h_text.'</a></h'.h_level.'></div>'
|
||||
|
||||
let processed = 1
|
||||
endif
|
||||
|
Reference in New Issue
Block a user