Skip to content

Conversation

@fangyi-zhou
Copy link
Contributor

No description provided.

@fangyi-zhou
Copy link
Contributor Author

Any idea how do I deal with the test failures?

REDUNDANT_LINE_BREAK_REGEX = /([\p{Han}\p{Hiragana}\p{Katakana}]+)\n([\p{Han}\p{Hiragana}\p{Katakana}]+)/u
def fix_cjk_line_break(str)
while str.match(REDUNDANT_LINE_BREAK_REGEX)
str = str.gsub(REDUNDANT_LINE_BREAK_REGEX, '\1\2')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does a simple str.gsub!(REDUNDANT_LINE_BREAK_REGEX, '\1\2') not work?

@gettalong
Copy link
Owner

You need to adapt test/test_files.rb to suppress the tests that cannot be green, like TestFiles#test_test/testcases/cjk-line-break_text_to_latex_compilation.

@fangyi-zhou fangyi-zhou mentioned this pull request Apr 16, 2020
@gettalong gettalong self-assigned this Apr 17, 2020
@gettalong
Copy link
Owner

Thank you - I rebased and merged your changes.

@gettalong gettalong closed this Apr 17, 2020
weirane added a commit to weirane/blog that referenced this pull request May 4, 2020
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

Successfully merging this pull request may close these issues.

2 participants