Created
May 15, 2017 08:19
-
-
Save uwabami/df893429f431eca66728888200e8be86 to your computer and use it in GitHub Desktop.
Redmine Markdown Extra Formatter で `[[マルチバイト]]` を扱うための bluefeather の dirty hack
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
| --- bluefeather.rb.orig 2017-05-15 16:20:07.025427957 +0900 | |
| +++ bluefeather.rb 2017-05-15 16:20:41.598133562 +0900 | |
| @@ -1807,7 +1807,7 @@ | |
| @log.debug "%p" % @scanner.string[ startpos-1 .. @scanner.pos-1 ] | |
| rs.warnings << "link-id not found - #{linkid}" | |
| - text += @scanner.string[ startpos-1 .. @scanner.pos-1 ] | |
| + text += '[' + link + ']' + @scanner[0] | |
| end | |
| # ...or for an inline style second part | |
| @@ -1828,7 +1828,7 @@ | |
| # No linkid part: just append the first part as-is. | |
| else | |
| @log.debug "No linkid, so no anchor. Appending literal text." | |
| - text += @scanner.string[ startpos-1 .. @scanner.pos-1 ] | |
| + text += '[' + link + ']' | |
| end # if linkid | |
| # Plain text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment