srctree

Gregory Mullen parent 5836b1c5 6be6f66b
add partial markdown backlash support

src/syntax/markdown.zig added: 25, removed: 5, total 20
@@ -5,6 +5,7 @@ pub fn translate(a: Allocator, blob: []const u8) ![]u8 {
var newline: u8 = 255;
var idx: usize = 0;
var backtick: bool = false;
var esc = true;
while (idx < blob.len) : (idx += 1) {
sw: switch (blob[idx]) {
'\n' => {
@@ -88,8 +89,28 @@ pub fn translate(a: Allocator, blob: []const u8) ![]u8 {
try output.appendSlice("<span class=\"coderef\">");
}
},
'\\' => {
if (idx + 1 >= blob.len) {
try output.append('\\');
break;
}
idx += 1;
switch (blob[idx]) {
'\\' => {
try output.append('\\');
idx += 1;
},
'`' => |c| {
try output.append(c);
idx += 1;
},
else => {},
}
continue :sw blob[idx];
},
else => |c| {
newline = 0;
esc = false;
if (abx.Html.clean(c)) |clean| {
try output.appendSlice(clean);
} else {
 
static/main.css added: 25, removed: 5, total 20
@@ -186,7 +186,7 @@ repo {
display: block;
&.landing {
border-radius: 4px 4px 0 0;
border: 1px solid #808080;
/* border: 1px solid #808080; */
intro {
 
span:first-child{
@@ -263,9 +263,8 @@ readme {
.codeblock {
white-space: pre;
}
/* TODO remove */
code {
white-space: pre;
width: 98%;
}
}