From 22340ebb258a7ea1d86e8ca100c2c4142674b661 Mon Sep 17 00:00:00 2001 From: Marcus Holl Date: Mon, 4 Feb 2019 12:41:38 +0100 Subject: [PATCH] allow single line comments like this /** short comment */ rather than /** * short comment */ --- documentation/bin/createDocu.groovy | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/documentation/bin/createDocu.groovy b/documentation/bin/createDocu.groovy index b8ba84911..bfa4af1a3 100644 --- a/documentation/bin/createDocu.groovy +++ b/documentation/bin/createDocu.groovy @@ -235,7 +235,7 @@ class Helper { mandatoryLines.clear() } - if( line.trim() ==~ /^\/\*\*/ ) { + if( line.trim() ==~ /^\/\*\*.*/ ) { docu = true } @@ -243,7 +243,7 @@ class Helper { def _line = line _line = _line.replaceAll('^\\s*', '') // leading white spaces if(_line.startsWith('/**')) _line = _line.replaceAll('^\\/\\*\\*', '') // start comment - if(_line.startsWith('*/')) _line = _line.replaceAll('^\\*/', '') // end comment + if(_line.startsWith('*/') || _line.trim().endsWith('*/')) _line = _line.replaceAll('^\\*/', '').replaceAll('\\*/\\s*$', '') // end comment if(_line.startsWith('*')) _line = _line.replaceAll('^\\*', '') // continue comment if(_line.startsWith(' ')) _line = _line.replaceAll('^\\s', '') if(_line ==~ /.*@possibleValues.*/) { @@ -275,7 +275,7 @@ class Helper { } } - if(docu && line.trim() ==~ /^\*\//) { + if(docu && line.trim() ==~ /^.*\*\//) { docu = false value = false mandatory = false