소스 검색

Update documentation;

bjorn 10 년 전
부모
커밋
84113efae1
2개의 변경된 파일6개의 추가작업 그리고 5개의 파일을 삭제
  1. 5 5
      doc/README.md
  2. 1 0
      tools/docroc.lua

+ 5 - 5
doc/README.md

@@ -8,9 +8,9 @@ Creates a new Observer.
 
 Arguments:
 
-- `[onNext=]` (`function`) - Called when the Observable produces a value.
-- `[onError=]` (`function`) - Called when the Observable terminates due to an error.
-- `[onComplete=]` (`function`) - Called when the Observable completes normally.
+- `[onNext]` (`function`) - Called when the Observable produces a value.
+- `[onError]` (`function`) - Called when the Observable terminates due to an error.
+- `[onComplete]` (`function`) - Called when the Observable completes normally.
 
 Returns:
 
@@ -30,7 +30,7 @@ Notify the Observer that an error has occurred.
 
 Arguments:
 
-- `[message=]` (`string`) - A string describing what went wrong.
+- `[message]` (`string`) - A string describing what went wrong.
 
 #### `:onComplete()`
 
@@ -92,7 +92,7 @@ Subscribes to this Observable and prints values it produces.
 
 Arguments:
 
-- `[name=]` (`string`) - Prefixes the printed messages with a name.
+- `[name]` (`string`) - Prefixes the printed messages with a name.
 
 #### `:first()`
 

+ 1 - 0
tools/docroc.lua

@@ -50,6 +50,7 @@ rocdoc.processors = {
     local type = body:match('^%s*(%b{})'):sub(2, -2):gsub('(%=)(.*)', function(_, value)
       optional = true
       default = value
+      if #default == 0 then default = nil end
       return ''
     end)