redpen-cc / redpen

RedPen is an open source proofreading tool to check if your technical documents meet the writing standard. RedPen supports various markup text formats (Markdown, Textile, AsciiDoc, Re:VIEW, reStructuredText and LaTeX).
https://redpen.cc
Apache License 2.0
567 stars 74 forks source link

Support pretty print for document, section and so on #478

Open kenhys opened 9 years ago

kenhys commented 9 years ago

In javascript validator, if you write 'print(sentence)', it shows something like 'Sentence{links=[], lineNumber=8, content='セクション', startPositionOffset=0, isFirstSentence=false, tokens=[], offsetMap=[]} ', but not for document, section, paragraph and so on.

It just shows 'cc.redpen.model.Section@12f3afb5'. It seems that there is no clue about what section has. It actually has 'level', 'headerContents', 'paragraphs', ...., but we must investigate redpen-core to know it.

It is helpful to write validator if print(section) or print(paragraph) shows similar result to print(sentence) output.

takahi-i commented 9 years ago

Thank you very much for the valuable comment @kenhys!

We will give it a try the implementation!