Added title attribute for images, fixed formatting of raw blocks.
This commit is contained in:
parent
583b3ba010
commit
42d04b77de
2 changed files with 4 additions and 2 deletions
|
@ -194,6 +194,8 @@ class HTMLGenerator(OutputGenerator):
|
||||||
attributes["width"] = e.attributes["width"]
|
attributes["width"] = e.attributes["width"]
|
||||||
if "height" in e.attributes:
|
if "height" in e.attributes:
|
||||||
attributes["height"] = e.attributes["height"]
|
attributes["height"] = e.attributes["height"]
|
||||||
|
if "title" in e.attributes:
|
||||||
|
attributes["title"] = e.attributes["title"]
|
||||||
|
|
||||||
if e.title:
|
if e.title:
|
||||||
attributes["alt"] = e.title
|
attributes["alt"] = e.title
|
||||||
|
|
|
@ -272,9 +272,9 @@ class OutputGenerator:
|
||||||
self.write(self.end_tag(tag))
|
self.write(self.end_tag(tag))
|
||||||
|
|
||||||
def generate_raw_block_tag(self, tag: str, text: str, attributes: dict[str,str]={}):
|
def generate_raw_block_tag(self, tag: str, text: str, attributes: dict[str,str]={}):
|
||||||
self.writeln(self.start_tag(tag, attributes))
|
self.writeraw(self.start_tag(tag, attributes))
|
||||||
self.writeraw(text)
|
self.writeraw(text)
|
||||||
self.writeln(self.end_tag(tag))
|
self.writeraw(self.end_tag(tag))
|
||||||
|
|
||||||
def generate_empty_block_tag(self, tag: str, attributes: dict[str,str]={}):
|
def generate_empty_block_tag(self, tag: str, attributes: dict[str,str]={}):
|
||||||
self.writeln(self.single_tag(tag, attributes))
|
self.writeln(self.single_tag(tag, attributes))
|
||||||
|
|
Loading…
Reference in a new issue