fix anchors. Now working. New classes CSS (anchor_target, anchor_link)
This commit is contained in:
parent
36520d9ab6
commit
0d91e2dce9
|
@ -87,7 +87,7 @@ headers = (
|
|||
# [6] = Check content differently. 't' = startswith
|
||||
#-------------------------------------------------------------
|
||||
words_tags = [
|
||||
('>_', '_<', '<a class="anchor" href="#%s">', '</a>', 'anchors', 'w'),
|
||||
('>_', '_<', '<a class="anchor_link" href="#%s">', '</a>', 'anchors', 'w'),
|
||||
('*_', '_*', '<strong class="strong">', '</strong>', 'strongs', 'w'),
|
||||
('+_', '_+', '<b class="bold">', '</b>', 'bolds', 'w'),
|
||||
('/_', '_/', '<em class="em">', '</em>', 'emphasis', 'w'),
|
||||
|
@ -117,7 +117,7 @@ tpl_tags = [
|
|||
#-----------------------------------
|
||||
single_tags = [
|
||||
('|', '<br />'), # New Line
|
||||
('->', '<a href="%s"></a>') # Anchors
|
||||
('->', '<a class="anchor_target" id="%s"></a>') # Anchors
|
||||
]
|
||||
|
||||
# Markers for lists, to check in list content
|
||||
|
|
|
@ -288,10 +288,10 @@ def wip_abbrs():
|
|||
)
|
||||
|
||||
|
||||
#-------------------------------------#
|
||||
# Get width and height for image #
|
||||
# from parameter c=, from wip_image() #
|
||||
#-------------------------------------#
|
||||
#---------------------------------------#
|
||||
# Get width and height for image #
|
||||
# from parameter w/h=, from wip_image() #
|
||||
#---------------------------------------#
|
||||
def get_wh_image(value):
|
||||
sizes = re.findall(r'(\d+)|(\D+)', value)
|
||||
if not sizes[0][1]: return('%spx'%value)
|
||||
|
@ -373,7 +373,7 @@ def wip_images():
|
|||
)
|
||||
|
||||
|
||||
#============================================#
|
||||
#--------------------------------------------#
|
||||
# Get parameters for quote (author, date...) #
|
||||
#--------------------------------------------#
|
||||
def quote_params(qline):
|
||||
|
@ -589,8 +589,7 @@ def wip_titles():
|
|||
title_html = '<h%s class="title_%s">%s</h%s>'%(hx, hx, title_cont, hx)
|
||||
article_temp = article_temp.replace(line, title_html)
|
||||
|
||||
|
||||
|
||||
|
||||
# Remove useless empty lines from article
|
||||
for line in article_temp.rsplit('\n'):
|
||||
if line:
|
||||
|
|
Loading…
Reference in New Issue