@cccarv82/freya 1.0.14 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/web.js +4 -3
- package/package.json +1 -1
package/cli/web.js
CHANGED
|
@@ -873,6 +873,7 @@ function html(defaultDir) {
|
|
|
873
873
|
let inCode = false;
|
|
874
874
|
let inList = false;
|
|
875
875
|
|
|
876
|
+
const NL = String.fromCharCode(10);
|
|
876
877
|
const BT = String.fromCharCode(96); // backtick
|
|
877
878
|
const FENCE = BT + BT + BT;
|
|
878
879
|
const inlineCodeRe = /\x60([^\x60]+)\x60/g;
|
|
@@ -895,11 +896,11 @@ function html(defaultDir) {
|
|
|
895
896
|
}
|
|
896
897
|
|
|
897
898
|
if (inCode) {
|
|
898
|
-
html += escapeHtml(line) +
|
|
899
|
+
html += escapeHtml(line) + NL;
|
|
899
900
|
continue;
|
|
900
901
|
}
|
|
901
902
|
|
|
902
|
-
const h = line.match(/^(#{1,3})\
|
|
903
|
+
const h = line.match(/^(#{1,3})[ \t]+(.*)$/);
|
|
903
904
|
if (h) {
|
|
904
905
|
closeList();
|
|
905
906
|
const lvl = h[1].length;
|
|
@@ -907,7 +908,7 @@ function html(defaultDir) {
|
|
|
907
908
|
continue;
|
|
908
909
|
}
|
|
909
910
|
|
|
910
|
-
const li = line.match(
|
|
911
|
+
const li = line.match(/^[ \t]*[-*][ \t]+(.*)$/);
|
|
911
912
|
if (li) {
|
|
912
913
|
if (!inList) { html += '<ul class="md-ul">'; inList = true; }
|
|
913
914
|
const content = escapeHtml(li[1]).replace(inlineCodeRe, '<code class="md-inline">$1</code>');
|