Skip to content

Commit

Permalink
#6 fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Aug 7, 2020
1 parent eacf86a commit 2df8203
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bin/texsc
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Options are:"
{ cmd: c, opts: o || 'p' }
end
ignores.each do |i|
tex = tex.gsub(/\\begin{#{i[:cmd]}}.+\\end{#{i[:cmd]}}/m, '')
tex = tex.gsub(/\\begin{#{Regexp.escape(i[:cmd])}}.+\\end{#{Regexp.escape(i[:cmd])}}/m, '')
end
log.info("Checking #{f} (#{tex.length} chars)...")
cmd = [
Expand Down
11 changes: 11 additions & 0 deletions features/cli.feature
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,17 @@ Feature: Command Line Processing
When I run bin/texsc with "--ignore nospell:p article.tex"
Then Exit code is zero

Scenario: Bad LaTeX with complex --ignore can be spell checked
Given I have a "article.tex" file with content:
"""
\documentclass{article}
\begin{document}
How are you, \begin{Nospell*}{test}friiend\end{Nospell*}?
\end{document}
"""
When I run bin/texsc with "--ignore Nospell*:p article.tex"
Then Exit code is zero

Scenario: Bad LaTeX with too short words can be spell checked
Given I have a "article.tex" file with content:
"""
Expand Down

0 comments on commit 2df8203

Please sign in to comment.