Created
December 1, 2020 06:23
-
-
Save kmuto/1629b3ae357ec287efe221288a960753 to your computer and use it in GitHub Desktop.
出力前に “ ” のクォートをバックエンド向きの形に置換する
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 出力前に “ ” のクォートをバックエンド向きの形に置換する | |
module ReVIEW | |
module HTMLBuilderOverride | |
def result | |
super.gsub('“', '"').gsub('”', '"') | |
end | |
end | |
class HTMLBuilder | |
prepend HTMLBuilderOverride | |
end | |
module LATEXBuilderOverride | |
def result | |
super.gsub('“', '``').gsub('”', "''") | |
end | |
end | |
class LATEXBuilder | |
prepend LATEXBuilderOverride | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment