2DU пре 9 година
родитељ
комит
95e1e8c24e
2 измењених фајлова са 6 додато и 1 уклоњено
  1. 4 0
      app.py
  2. 2 1
      templates/index.html

+ 4 - 0
app.py

@@ -105,6 +105,10 @@ def namumark(title, data):
     data = re.sub('\^\^(?P<in>.+?)\^\^(?!\^)', '<sup>\g<in></sup>', data)
     data = re.sub(',,(?P<in>.+?),,(?!,)', '<sub>\g<in></sub>', data)
     
+    data = re.sub("##\s?(?P<in>[^\n]*)\n", "<div style='display:none;'>\g<in></div>", data);
+    
+    data = re.sub("\[br\]",'<br>', data);
+    
     while True:
         m = re.search("\[youtube\(((?:(?!,|\)\]).)*)(?:,\s)?(?:width=((?:(?!,|\)\]).)*))?(?:,\s)?(?:height=((?:(?!,|\)\]).)*))?(?:,\s)?(?:width=((?:(?!,|\)\]).)*))?\)\]", data)
         if(m):

+ 2 - 1
templates/index.html

@@ -387,7 +387,8 @@
 			{% elif tn == 17 %}
 			<h1 class="title">{{title}}</h1>
 			<div>
-				<h2 style="margin-top: -5px;">기초 문법</h2>
+                <a class="out_link" style="margin-top: -5px;" href="https://namu.wiki/w/%EB%82%98%EB%AC%B4%EC%9C%84%ED%82%A4:%ED%8E%B8%EC%A7%91%20%EB%8F%84%EC%9B%80%EB%A7%90">참조</a>
+				<h2>기초 문법</h2>
 				<li>~~취소선~~ --취소선--</li>
 				<li>'''강조'''</li>
 				<li>''기울이기''</li>