diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2019-05-16 16:32:54 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2019-05-16 16:32:54 +0300 |
commit | d70fd11d67e584003fabfb3fa86f7acd0533d8ce (patch) | |
tree | 36c196608d165a6c492763fb1a40daad665deccf /mod/page.hxx | |
parent | 8f9a80a9ac8f353ce2cdafa23f0e5163d30d5800 (diff) |
Strip package title from package description on package and version details pages
Diffstat (limited to 'mod/page.hxx')
-rw-r--r-- | mod/page.hxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mod/page.hxx b/mod/page.hxx index 1138a80..7260031 100644 --- a/mod/page.hxx +++ b/mod/page.hxx @@ -589,6 +589,10 @@ namespace brep // description element instead. Note that such an error indicates an issue // with the implementation, rather than with the specified text. // + // Optionally strip the heuristically detected document "title". Currently, + // this only applies to Markdown where a leading level-one heading is + // assumed to be the title. + // class DIV_TEXT { public: @@ -596,11 +600,13 @@ namespace brep // DIV_TEXT (const string& t, text_type tp, + bool st, const string& id, const string& what, const basic_mark& diag) : text_ (t), type_ (tp), + strip_title_ (st), length_ (t.size ()), url_ (nullptr), id_ (id), @@ -613,6 +619,7 @@ namespace brep // DIV_TEXT (const string& t, text_type tp, + bool st, size_t l, const string& u, const string& id, @@ -620,6 +627,7 @@ namespace brep const basic_mark& diag) : text_ (t), type_ (tp), + strip_title_ (st), length_ (l), url_ (&u), id_ (id), @@ -634,6 +642,7 @@ namespace brep private: const string& text_; text_type type_; + bool strip_title_; size_t length_; const string* url_; // Full page url. string id_; |