qdoc: Add the \hr command
Now you can out put a horizontal line anywhere in your text. Change-Id: I9b8bbbd6aa312e8386fb1a3b165876d76057f784 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
This commit is contained in:
parent
9b0c0823c0
commit
9bd4106297
@ -197,6 +197,7 @@ static const struct {
|
||||
{ "FormattingRight", Atom::FormattingRight },
|
||||
{ "GeneratedList", Atom::GeneratedList },
|
||||
{ "GuidLink", Atom::GuidLink},
|
||||
{ "hr", Atom::HR},
|
||||
{ "Image", Atom::Image },
|
||||
{ "ImageText", Atom::ImageText },
|
||||
{ "ImportantLeft", Atom::ImportantLeft },
|
||||
|
@ -84,6 +84,7 @@ public:
|
||||
FormattingRight,
|
||||
GeneratedList,
|
||||
GuidLink,
|
||||
HR,
|
||||
Image,
|
||||
ImageText,
|
||||
ImportantLeft,
|
||||
|
@ -1194,6 +1194,11 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
|
||||
}
|
||||
}
|
||||
break;
|
||||
case Atom::HR: //<p outputclass="horizontal-rule" />
|
||||
writeStartTag(DT_p);
|
||||
xmlWriter().writeAttribute("outputclass","horizontal-rule");
|
||||
writeEndTag(); // </p>
|
||||
break;
|
||||
case Atom::Image:
|
||||
case Atom::InlineImage:
|
||||
{
|
||||
|
@ -118,6 +118,7 @@ enum {
|
||||
CMD_GENERATELIST,
|
||||
CMD_GRANULARITY,
|
||||
CMD_HEADER,
|
||||
CMD_HR,
|
||||
CMD_I,
|
||||
CMD_IF,
|
||||
CMD_IMAGE,
|
||||
@ -235,6 +236,7 @@ static struct {
|
||||
{ "generatelist", CMD_GENERATELIST, 0 },
|
||||
{ "granularity", CMD_GRANULARITY, 0 }, // ### don't document for now
|
||||
{ "header", CMD_HEADER, 0 },
|
||||
{ "hr", CMD_HR, 0 },
|
||||
{ "i", CMD_I, 0 },
|
||||
{ "if", CMD_IF, 0 },
|
||||
{ "image", CMD_IMAGE, 0 },
|
||||
@ -904,6 +906,10 @@ void DocParser::parse(const QString& source,
|
||||
case CMD_E:
|
||||
startFormat(ATOM_FORMATTING_ITALIC, cmd);
|
||||
break;
|
||||
case CMD_HR:
|
||||
leavePara();
|
||||
append(Atom::HR);
|
||||
break;
|
||||
case CMD_IF:
|
||||
preprocessorSkipping.push(!Tokenizer::isTrue(getRestOfLine()));
|
||||
if (preprocessorSkipping.top())
|
||||
|
@ -762,6 +762,9 @@ int HtmlGenerator::generateAtom(const Atom *atom,
|
||||
}
|
||||
}
|
||||
break;
|
||||
case Atom::HR:
|
||||
out() << "<hr />\n";
|
||||
break;
|
||||
case Atom::Image:
|
||||
case Atom::InlineImage:
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user