Mercurial Hosting > luan
diff src/luan/modules/parsers/BBCode.java @ 1248:475905984870
improve lucene highlighter and allow bbcode_to_text quoter to be nil
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 18 Jul 2018 01:38:53 -0600 |
parents | 728d8e75f476 |
children | 25746915a241 |
line wrap: on
line diff
--- a/src/luan/modules/parsers/BBCode.java Tue Jul 17 22:17:01 2018 -0600 +++ b/src/luan/modules/parsers/BBCode.java Wed Jul 18 01:38:53 2018 -0600 @@ -280,8 +280,12 @@ } private String quote(Object... args) throws LuanException { - if( quoter==null ) - throw new LuanException("BBCode quoter function not defined"); + if( quoter==null ) { + if( toHtml ) + throw new LuanException("BBCode quoter function not defined"); + else + return ""; + } Object obj = quoter.call(luan,args); if( !(obj instanceof String) ) throw new LuanException("BBCode quoter function returned "+Luan.type(obj)+" but string required");