mirror of
https://gitlab.com/chicken-riders/RcGcDb.git
synced 2025-02-23 00:54:09 +00:00
don't link non-link links
This commit is contained in:
parent
0e5a3169e2
commit
5e3497c190
|
@ -39,13 +39,13 @@ class LinkParser(HTMLParser):
|
||||||
|
|
||||||
def handle_data(self, data):
|
def handle_data(self, data):
|
||||||
if self.recent_href:
|
if self.recent_href:
|
||||||
self.new_string = self.new_string + "[{}](<{}>)".format(data, self.recent_href)
|
self.new_string = self.new_string + "[{}](<{}>)".format(data.replace("//", "/\\/"), self.recent_href)
|
||||||
self.recent_href = ""
|
self.recent_href = ""
|
||||||
else:
|
else:
|
||||||
self.new_string = self.new_string + data
|
self.new_string = self.new_string + data.replace("//", "/\\/")
|
||||||
|
|
||||||
def handle_comment(self, data):
|
def handle_comment(self, data):
|
||||||
self.new_string = self.new_string + data
|
self.new_string = self.new_string + data.replace("//", "/\\/")
|
||||||
|
|
||||||
def handle_endtag(self, tag):
|
def handle_endtag(self, tag):
|
||||||
# logger.debug(self.new_string)
|
# logger.debug(self.new_string)
|
||||||
|
|
Loading…
Reference in a new issue