← Back to team overview

widelands-dev team mailing list archive

Re: [Merge] lp:~widelands-dev/widelands/fh1_width_and_mapobject_messages into lp:widelands

 

Added a reply to your nit. I don't see any trouble down the line with this one - anybody who fiddles with that code should know how the tags work in any case.

Thanks for testing!

@bunnybot merge

Diff comments:

> 
> === modified file 'src/graphic/text_layout.cc'
> --- src/graphic/text_layout.cc	2017-03-25 15:32:49 +0000
> +++ src/graphic/text_layout.cc	2017-05-01 08:57:15 +0000
> @@ -31,6 +31,16 @@
>  #include "graphic/text/font_set.h"
>  #include "graphic/text_constants.h"
>  
> +namespace {
> +bool is_paragraph(const std::string& text) {
> +	return boost::starts_with(text, "<p");
> +}

p means paragraph. We haven't had any issues with using this tag in the old renderer, and neither do we have any in the new one. The tags look pretty much like HTML tags ;)

List of tags:

http://bazaar.launchpad.net/~widelands-dev/widelands/trunk/view/head:/src/graphic/text/rt_parse.cc#L177

> +
> +bool is_div(const std::string& text) {
> +	return boost::starts_with(text, "<div");
> +}
> +} // namespace
> +
>  void replace_entities(std::string* text) {
>  	boost::replace_all(*text, "&gt;", ">");
>  	boost::replace_all(*text, "&lt;", "<");


-- 
https://code.launchpad.net/~widelands-dev/widelands/fh1_width_and_mapobject_messages/+merge/318189
Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/fh1_width_and_mapobject_messages.


References