head 1.3; access; symbols pkgsrc-2026Q2:1.2.0.58 pkgsrc-2026Q2-base:1.2 pkgsrc-2026Q1:1.2.0.56 pkgsrc-2026Q1-base:1.2 pkgsrc-2025Q4:1.2.0.54 pkgsrc-2025Q4-base:1.2 pkgsrc-2025Q3:1.2.0.52 pkgsrc-2025Q3-base:1.2 pkgsrc-2025Q2:1.2.0.50 pkgsrc-2025Q2-base:1.2 pkgsrc-2025Q1:1.2.0.48 pkgsrc-2025Q1-base:1.2 pkgsrc-2024Q4:1.2.0.46 pkgsrc-2024Q4-base:1.2 pkgsrc-2024Q3:1.2.0.44 pkgsrc-2024Q3-base:1.2 pkgsrc-2024Q2:1.2.0.42 pkgsrc-2024Q2-base:1.2 pkgsrc-2024Q1:1.2.0.40 pkgsrc-2024Q1-base:1.2 pkgsrc-2023Q4:1.2.0.38 pkgsrc-2023Q4-base:1.2 pkgsrc-2023Q3:1.2.0.36 pkgsrc-2023Q3-base:1.2 pkgsrc-2023Q2:1.2.0.34 pkgsrc-2023Q2-base:1.2 pkgsrc-2023Q1:1.2.0.32 pkgsrc-2023Q1-base:1.2 pkgsrc-2022Q4:1.2.0.30 pkgsrc-2022Q4-base:1.2 pkgsrc-2022Q3:1.2.0.28 pkgsrc-2022Q3-base:1.2 pkgsrc-2022Q2:1.2.0.26 pkgsrc-2022Q2-base:1.2 pkgsrc-2022Q1:1.2.0.24 pkgsrc-2022Q1-base:1.2 pkgsrc-2021Q4:1.2.0.22 pkgsrc-2021Q4-base:1.2 pkgsrc-2021Q3:1.2.0.20 pkgsrc-2021Q3-base:1.2 pkgsrc-2021Q2:1.2.0.18 pkgsrc-2021Q2-base:1.2 pkgsrc-2021Q1:1.2.0.16 pkgsrc-2021Q1-base:1.2 pkgsrc-2020Q4:1.2.0.14 pkgsrc-2020Q4-base:1.2 pkgsrc-2020Q3:1.2.0.12 pkgsrc-2020Q3-base:1.2 pkgsrc-2020Q2:1.2.0.10 pkgsrc-2020Q2-base:1.2 pkgsrc-2020Q1:1.2.0.6 pkgsrc-2020Q1-base:1.2 pkgsrc-2019Q4:1.2.0.8 pkgsrc-2019Q4-base:1.2 pkgsrc-2019Q3:1.2.0.4 pkgsrc-2019Q3-base:1.2 pkgsrc-2019Q2:1.2.0.2 pkgsrc-2019Q2-base:1.2 pkgsrc-2019Q1:1.1.0.34 pkgsrc-2019Q1-base:1.1 pkgsrc-2018Q4:1.1.0.32 pkgsrc-2018Q4-base:1.1 pkgsrc-2018Q3:1.1.0.30 pkgsrc-2018Q3-base:1.1 pkgsrc-2018Q2:1.1.0.28 pkgsrc-2018Q2-base:1.1 pkgsrc-2018Q1:1.1.0.26 pkgsrc-2018Q1-base:1.1 pkgsrc-2017Q4:1.1.0.24 pkgsrc-2017Q4-base:1.1 pkgsrc-2017Q3:1.1.0.22 pkgsrc-2017Q3-base:1.1 pkgsrc-2017Q2:1.1.0.18 pkgsrc-2017Q2-base:1.1 pkgsrc-2017Q1:1.1.0.16 pkgsrc-2017Q1-base:1.1 pkgsrc-2016Q4:1.1.0.14 pkgsrc-2016Q4-base:1.1 pkgsrc-2016Q3:1.1.0.12 pkgsrc-2016Q3-base:1.1 pkgsrc-2016Q2:1.1.0.10 pkgsrc-2016Q2-base:1.1 pkgsrc-2016Q1:1.1.0.8 pkgsrc-2016Q1-base:1.1 pkgsrc-2015Q4:1.1.0.6 pkgsrc-2015Q4-base:1.1 pkgsrc-2015Q3:1.1.0.4 pkgsrc-2015Q3-base:1.1 pkgsrc-2015Q2:1.1.0.2 pkgsrc-2015Q2-base:1.1; locks; strict; comment @# @; 1.3 date 2026.08.27.11.56.02; author adam; state dead; branches; next 1.2; commitid wu3Cv3A2LflyQgTG; 1.2 date 2019.05.07.14.26.06; author hauke; state Exp; branches; next 1.1; commitid yTRx9eaTvirCshmB; 1.1 date 2015.05.22.14.01.16; author hauke; state Exp; branches; next ; commitid eq4TJLWbWL59Ormy; desc @@ 1.3 log @py-ClientForm py-HTMLgen py-blosxom py-jonpy py-recaptcha py-simpletal py-swish-e: removed; outdated and not needed @ text @$NetBSD: patch-Pyblosxom_plugins_readmore.py,v 1.2 2019/05/07 14:26:06 hauke Exp $ Try to make sure the truncated text is valid HTML Use the current flavour before the default one, if available. --- Pyblosxom/plugins/readmore.py.orig 2013-07-31 00:53:58.000000000 +0000 +++ Pyblosxom/plugins/readmore.py @@@@ -194,8 +194,15 @@@@ def cb_story(args): breakpoint = config.get("readmore_breakpoint", READMORE_BREAKPOINT) template = config.get("readmore_template", READMORE_TEMPLATE) - # check to see if the breakpoint is in the body. - match = re.search(breakpoint, entry["body"]) + """ + Check to see if the breakpoint is in the body. + + Since it might have been wrapped in html tags by a markdown + plugin, grab everything from the end of breakpoint up to, but + excluding, either the first opening tag, or newline. + """ + match = re.search('(' + breakpoint + ')(.*?)(<[ ]*?[^/].+|[\n])', + entry["body"]) # if not, return because we don't have to do anything if not match: @@@@ -209,7 +216,11 @@@@ def cb_story(args): # otherwise we replace the breakpoint with the template base_url = config["base_url"] file_path = entry["file_path"] - flavour = config.get("default_flavour", "html") + + # Set and use current (or default) flavour for full entry + flavour = data.get( + "flavour", config.get("default_flavour", "html")) + url = '%s/%s.%s' % (base_url, file_path, flavour) link = (template % {"url": url, @@@@ -218,4 +229,4 @@@@ def cb_story(args): "flavour": flavour}) entry["just_summary"] = 1 - entry["body"] = entry["body"][:match.start()] + link + entry["body"] = entry["body"][:match.start(1)] + link + str(match.group(2)) @ 1.2 log @Make sure the readmore plugin produces valid html - browsers are not as tolerant as they used to be. The current version does not yet support python3, so mandate 2.7. @ text @d1 1 a1 1 $NetBSD$ @ 1.1 log @In the readmore plugin, use the current flavour before the default one, if available. @ text @d3 2 d9 19 a27 1 @@@@ -209,7 +209,11 @@@@ def cb_story(args): d40 6 @