This is an automated email from the ASF dual-hosted git repository.

skygo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/netbeans-antora.git


The following commit(s) were added to refs/heads/main by this push:
     new 6d99a27  reduce feed
6d99a27 is described below

commit 6d99a276a9484d9e2be8e4a098a76d360e53c222
Author: Eric Barboni <sk...@apache.org>
AuthorDate: Thu Feb 22 14:43:16 2024 +0100

    reduce feed
---
 lib/rssfeed.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/rssfeed.js b/lib/rssfeed.js
index 7691516..0e07e6e 100644
--- a/lib/rssfeed.js
+++ b/lib/rssfeed.js
@@ -78,13 +78,15 @@ function sortByDate (a, b) {
 // reduce the page content to approx content, 
 function blogcontent (s) {
   // end of content
-  const endof = s.indexOf("</article>")
+  const endofsection  = s.indexOf('<section class="tools">')
+  const endofarticle = s.indexOf("</article>")
   // possible starting point of article,
   const startofparagraph = s.indexOf('<div class="paragraph">')
   const startofpreamble = s.indexOf('<div id="preamble">')
   // take min if defined
   const startpoint = Math.min( startofparagraph>-1 ? startofparagraph : 
Infinity, startofpreamble >-1 ? startofpreamble: Infinity)
-  const split = s.substring( startpoint, endof)
+  const endpoint = Math.min( endofsection>-1 ? endofsection : Infinity, 
endofarticle >-1 ? endofarticle: Infinity)
+  const split = s.substring( startpoint, endpoint)
   return split
 }
 // remove some breaking char for xml 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to