Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PegDownProcessor's int and long constructor overloads are confusing #225

Open
hayohayo opened this issue Mar 15, 2016 · 0 comments
Open

Comments

@hayohayo
Copy link

I think, it's a little bit inconvenient that PegDownProcessor(int options) and PegDownProcessor(long maxParsingTimeInMillis) constructors seem so similar, but have very different semantic.

I have tried to use pegdown from Clojure:

;; This one correctly enables fenced blocks
(let [pegdown (PegDownProcessor. Extensions/FENCED_CODE_BLOCKS)]
  ;; use pegdown here
  )

;; This one does not. Both bit-or and + return Long value.
;; Normally Long would be coerced to int, if maxParsingTimeInMillis
;; constructor did not exist
(let [pegdown (PegDownProcessor. (bit-or Extensions/FENCED_CODE_BLOCKS Extensions/TABLES))]
  ;; use pegdown here
  )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant