Skip to content
This repository was archived by the owner on Oct 10, 2019. It is now read-only.
This repository was archived by the owner on Oct 10, 2019. It is now read-only.

Multiple highlight-article not working #600

Description

@dl1kse

Newsbeuter version (copy from newsbeuter -v):

newsbeuter 2.9 - http://www.newsbeuter.org/
Copyright (C) 2006-2010 Andreas Krennmair

newsbeuter ist Freie Software und unter der MIT/X Consortium License lizenziert.
Für mehr Information `newsbeuter -vv' eingeben.

Compilation date/time: Sep 22 2017 03:26:40
System: Linux 4.12.5-gentoo (x86_64)
Compiler: g++ 4.9.4
ncurses: ncurses 6.0.20150808 (compiled with 6.0)
libcurl: libcurl/7.53.0 OpenSSL/1.0.2k zlib/1.2.11 libidn2/0.16 libssh2/1.7.0 librtmp/2.3 (compiled with 7.53.0)
SQLite: 3.17.0 (compiled with 3.17.0)
libxml2: compiled with 2.9.4

Steps to reproduce the issue:

  1. Put multiple highlight-article configuration statements into the configuration file.

  2. Open a feed, with articles containing to be highlighted articles

  3. See, that only one highlight-article statement is working, colors from the second statement, with different colors influences the first highlight-article statement, the second highlight-article statement does not work

Other info you think is relevant:

I applied patch:

From 1d72eab529e9645eb2756935f0d44baf2f5a1f1c Mon Sep 17 00:00:00 2001
From: Luke Duncan <Duncan72187@gmail.com>
Date: Sat, 14 Nov 2015 01:54:53 -0500
Subject: [PATCH] Fix highlight article (Issue #166)

---
 src/itemview_formaction.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/itemview_formaction.cpp b/src/itemview_formaction.cpp
index 1687382f..17fe537c 100644
--- a/src/itemview_formaction.cpp
+++ b/src/itemview_formaction.cpp
@@ -565,6 +565,7 @@ void itemview_formaction::set_regexmanager(regexmanager * r) {
 	std::string attrstr;
 	for (auto attribute : attrs) {
 		attrstr.append(utils::strprintf("@style_%u_normal:%s ", i, attribute.c_str()));
+		i++;
 	}
 	attrstr.append("@style_b_normal[color_bold]:attr=bold @style_u_normal[color_underline]:attr=underline ");
 	std::string textview = utils::strprintf("{textview[article] style_normal[article]: style_end[styleend]:fg=blue,attr=bold %s .expand:vh offset[articleoffset]:0 richtext:1}", attrstr.c_str());

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions