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

Handle quotation mark #21

Closed
takahi-i opened this issue Oct 23, 2013 · 5 comments
Closed

Handle quotation mark #21

takahi-i opened this issue Oct 23, 2013 · 5 comments

Comments

@takahi-i
Copy link
Member

If the left quotation mark is registered as the same as right quotation mark, they cannot be distinguished.

For example if we have the following settings, DocumentValidator thinks left quotation mark '"' needs not only before space but also after space.

<character name="LEFT_DOUBLE_QUOTATION_MARK" value="\'"  before-space="true" />
<character name="RIGHT_DOUBLE_QUOTATION_MARK" value="\'" after-space="true" />  
@takahi-i
Copy link
Member Author

InvalidCharacterValidator cannot handle the quotation mark with spaces problem as this topic.

One solution could be that we creates a new validator which just handle quotation marks named QuotationMarkValidator which takes left and right spaces into considerations.

@takahi-i
Copy link
Member Author

If I creates QuotationMarkValidator, it would be a good idea to remove quotation marks from character tables since character based validators cannot solve the quotation mark problems..

@takahi-i
Copy link
Member Author

Another idea is that Add non left or right QuotationMark in the character table and configure the preference in the QuotationMarkValidator. The configuration could be as follows.

<QuotationMarkValidator>
  <property name="use-same-single-quotation" value="true">
</QuotationMarkValidator>

@takahi-i
Copy link
Member Author

Decided to change default characters of quotations into non ascii characters. If users uses QuotationValidator for checking ascii quotation marks such as ' or " (these quotation mark does not have left and right variations) , users add the property use-acii.

<QuotationMarkValidator>
   <property name="use-acii" value="true">
</QuotationMarkValidator>

@takahi-i
Copy link
Member Author

fixes with #26

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