Comments (9)
I haven't done anything in Scala in a while, so I'm not sure. I'll check it out when I have some free time.
The expression that's failing is
"(?i)<[ ]*" + tagName + "[ ]*[^>]*>"
This is a basic search for HTML tags. I may have to sanitize that tag name, is there any kind of interesting HTML in the document you're trying to parse?
from knockoff.
I'm one of @ardok 's colleagues. We ran JProfiler against this section of code. Just to show you: http://i.imgur.com/bv63l36.png
That CPU time tree is from 3-4 minutes of execution time, most of which were spent compiling a markdown file we have. The tree extends quite far beyond what is shown here.
from knockoff.
I just updated the 2.10 build to 2.10.2, it doesn't really seem that it's build related at all, which makes sense.
How are HTML tags being used? Is there any stretch of code that appears like an HTML tag? Like <foo
?
from knockoff.
I don't think there is any.
There was something like [link](blah blah
without parenthese closure and it gave us None.get
error.
After fixing that, we faced that StackOverflowError. It's just that recursive findEnd
method.
What I did to "fix" it is reverting your HTMLBlock changes and making it Scala 2.10 ready.
Markdown loads much faster than using HTMLBlock.
from knockoff.
FYI, this is what we're currently using: https://github.com/ardok/knockoff/tree/non-recursive
I reverted your master branch to this commit: 74bfe4b (before you add emptySpace
) and updated it to use Scala 2.10
from knockoff.
Thanks!
What I really use is a reproduction case, I'm still not able to actually
generate the problem this change solves.
-Tristan
On Mon, Sep 9, 2013 at 1:42 PM, Ardo [email protected] wrote:
FYI, this is what we're currently using:
https://github.com/ardok/knockoff/tree/non-recursiveI reverted your master branch to this commit: 74bfe4bhttps://github.com/tristanjuricek/knockoff/commit/74bfe4bc3b6cdddcd417f38e1514b5574c11c44aand updated it to use Scala 2.10
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/35#issuecomment-24112835
.
from knockoff.
Give this a shot with your master
branch: https://github.com/stackmob/stackmob-docs/blob/master/sdks/ios/guides/developer.md
from knockoff.
i just had the same issue on a fresh install of a scala play app on a ubuntu 32 bit VM. the exact same install on a 64 bit VM works fine - can't explain it, but it must be due to some environment issues.
the content it tries to parse has a few html tags, yes... without the tags it works fine every time.
i'm using 0.8.1
from knockoff.
The one that works fine for me is this from this commit (dated July 22, 2012): 74bfe4b
I forked from that commit and update it to use scala 2.10.2.
This is what I'm using for now: https://github.com/ardok/knockoff/tree/non-recursive
If you're gonna use my forked repo, just remember to change the version in build.sbt
since it has my name on the version build.
from knockoff.
Related Issues (20)
- Markdown compatibility issue HOT 1
- An asterisk em right after an asterisk list marker is not processed correctly HOT 1
- Markdown compatibility: Bad link translation with parenthetical text HOT 1
- Markdown compatibility problem: Hard break HOT 4
- LaTeX usage considerably broken HOT 1
- Extending Wholesaler trait (with SCAML stuff) hides LatexXHTMLWriter methods??!? HOT 1
- Handling \r\n newlines HOT 3
- Knockoff uses "Unparsed" for inline HTML in Markdown document HOT 1
- parsing links ending with brackets HOT 2
- code block following a list HOT 2
- cross publish for scala 2.9.2 HOT 10
- paragraphs mess with html HOT 3
- Parsing inside blockquote is not always correct HOT 1
- Malformed links throw java.util.NoSuchElementException: None.get HOT 1
- Lists being parsed incorrectly HOT 2
- Stack Overflow in findStart HOT 2
- MD titles with ---- ending with with a space are not recognized as title
- There are unnecessary linebreaks before closing tags HOT 1
- Wrong interpretation of exclamation mark, some text, and then a link (interpretation as image)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from knockoff.