A Real Fix For the "Backslashes in Included Equations" Bug
Ruby's String.sub!(pattern, replacement) routine is fundamentally broken. But the block version works fine. Using the broken routine in the Chunk handler was a subtle mistake.
This commit is contained in:
parent
294ac909c4
commit
13b7e1d766
1 changed files with 2 additions and 2 deletions
|
@ -61,7 +61,7 @@ module Chunk
|
|||
end
|
||||
|
||||
def unmask
|
||||
@content.sub!(mask, @unmask_text)
|
||||
@content.sub!(/#{mask}/){|s| s.replace @unmask_text}
|
||||
end
|
||||
|
||||
def rendered?
|
||||
|
@ -73,7 +73,7 @@ module Chunk
|
|||
end
|
||||
|
||||
def revert
|
||||
@content.sub!(mask, @text)
|
||||
@content.sub!(/#{mask}/){|s| s.replace @text}
|
||||
# unregister
|
||||
@content.delete_chunk(self)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue