"""^(.*?\\,)(.*?)(?:\{(.+?)\})?\\,(\-+|=+)\s*\\,(.*?)$$""".r("before","inTAG","id","style","following") -> ("h",surroundByHeadTAGUnderlineStyle _),//Speedup
"""^(.*?)(\{toc(:.+?)?\})(.*)$$""".r("before","toc","range","following") -> ("ul",generateTOC _),
"^(.*\\\\,)((?:\\-|\\*){3,}|(?:(?:\\-|\\*)\\x20){3,})(.*?)$$".r("before","line","following") -> ("hr",putHrTAG _),
- "^(.*?)\\*\\*([^\\,]{1,64}?)\\*\\*(.*?)$$".r("before","inTAG","following") -> ("strong",surroundByGeneralTAG _),
- "^(.*?)\\*([^\\,]{1,64}?)\\*(.*?)$$".r("before","inTAG","following") -> ("em",surroundByGeneralTAG _),
+ "^(.*?)\\*\\*([^\\,|\\s]{1,64}?)\\*\\*(.*?)$$".r("before","inTAG","following") -> ("strong",surroundByGeneralTAG _),
+ "^(.*?)\\*([^\\,|\\s]{1,64}?)\\*(.*?)$$".r("before","inTAG","following") -> ("em",surroundByGeneralTAG _),
"""^(.*?\\,)(%{1,6})\x20(.*?)(\\,.*?)$$""".r("before","hSize","inTAG","following") -> ("h", autoNumberingHeader _),
"""^(.*?\\,)(((?:\x20{4,}|\t+)(.*?\\,))+?)(.*?)$$""".r("before","seq","inTAG","midInTag","following") -> ("code",surroundByPreCodeTAG _)
//late
val m = p findFirstMatchIn(doc)
if(m != None){title = m.get.group(1)}
- s"<${headTAG}>\n<${titleTAG}>${title}</${titleTAG}>\n</${headTAG}>"
+ s"<${headTAG}>\n<${titleTAG}>${title}</${titleTAG}>\n</${headTAG}>\n"
}
def preProcessors(doc:String) :String = {
val BLOCKTags = Set(
"address","blockquote","center","div","dl","fieldset","form","h1","h2","h3","h4","h5","h6",
- "header","noframes","noscript","ol","p","pre","table","ul")
+ "header","noframes","noscript","ol","p","pre","script","table","ul")
private val HTMLTag = LinkedHashMap[String,(List[String],(String)=>String)](
"hr"->Tuple2(List("xx"),passThrough _),
}
str
}
-
-
+
+
def specialCharConvert(text:List[String]):List[String] = {
if(text.isEmpty){return text}
var str = text.head
object BlackQuill{
private val log:Log = LogFactory.getLog(BlackQuill.getClass)
- val VERSION = "0.1.5"
+ val VERSION = "0.1.6"
val lastDate = "Augus 15 2013"
val wiki = "https://www.setminami.net/BlackQuill/"
"...and Markdown file's suffix is .md|.markdown|.txt|.bq|.BlackQuill\n" +
"e.g., BlackQuill --force foo.md"
-
val description = "Welcome to BlackQuill.\n" +
"BQ switches=> \n" + options +
"\nPlease see also... \n" +