OSDN Git Service

bug fix
authorSet <set.minami@gmail.com>
Sun, 28 Jul 2013 02:44:07 +0000 (11:44 +0900)
committerSet <set.minami@gmail.com>
Sun, 28 Jul 2013 02:44:07 +0000 (11:44 +0900)
mdTest/test2.html [new file with mode: 0644]
src/main/scala/org/blackquill/engine/BQParser.scala

diff --git a/mdTest/test2.html b/mdTest/test2.html
new file mode 100644 (file)
index 0000000..05360ce
--- /dev/null
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<head>
+<title>NO TITLE</title>
+</head>
+<html>
+<body>
+<p>bbbbbb<LINK>aaaa&rarr;aaaaaa</LINK>cccccc</p>
+
+</body>
+</html>
\ No newline at end of file
index bc8fa02..dd4ab73 100644 (file)
@@ -206,10 +206,8 @@ class BQParser {
        private def autoNumberSetting(doc:String):String = {
                val p = """^(.*?)(\{nrange(:h?\d?\-h?\d?)?\})(.*?)$$""".r
                val m = p findFirstMatchIn(doc)
-
-               lazy val ret = m.get.group(1) + m.get.group(4)
                if(m != None){
-
+                       lazy val ret = m.get.group(1) + m.get.group(4)
                        if(Option(m.get.group(3)) != None){
                                val p2 = """:(h?(\d)?\-h?(\d)?)""".r
                                val m2 = p2 findFirstMatchIn(m.get.group(3))
@@ -228,7 +226,7 @@ class BQParser {
                                }
                        }
                }
-               ret
+               doc
        }
 
        private def laTeXConvert(doc:String, regex:String, TAG:String):String = {