aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/models/api/utils.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/api/utils.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/api/utils.rb
index 81e74632ca9..56735bef90e 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/models/api/utils.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/models/api/utils.rb
@@ -46,12 +46,10 @@ class Api::Utils
end
def self.is_regexp?(s)
- begin
- Regexp.new(s)
- true
- rescue
- false
- end
+ Regexp.new(s)
+ true
+ rescue
+ false
end
def self.markdown_to_html(markdown)