1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

Hypertext: Fix alignment tags adding unwanted newlines (#9548)

This commit is contained in:
Pierre-Yves Rollo 2020-03-26 19:56:35 +01:00 committed by GitHub
parent a0998754a7
commit 49a558574f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 10 deletions

View file

@ -134,11 +134,13 @@ public:
Tag m_root_tag;
protected:
typedef enum { ER_NONE, ER_TAG, ER_NEWLINE } EndReason;
// Parser functions
void enterElement(ElementType type);
void endElement();
void enterParagraph();
void endParagraph();
void endParagraph(EndReason reason);
void pushChar(wchar_t c);
ParsedText::Tag *newTag(const std::string &name, const AttrsList &attrs);
ParsedText::Tag *openTag(const std::string &name, const AttrsList &attrs);
@ -160,6 +162,8 @@ protected:
StyleList m_style;
Element *m_element;
Paragraph *m_paragraph;
bool m_empty_paragraph;
EndReason m_end_paragraph_reason;
};
class TextDrawer