mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-08-18 23:11:22 +02:00
v109.3
Fixed crash when idling with the snow effect enabled. Added Android target to libretro port [rtretiakov] Various nall library improvements.
This commit is contained in:
@@ -81,6 +81,17 @@ inline auto DML::parseBlock(string& block, const string& pathname, uint depth) -
|
||||
}
|
||||
}
|
||||
|
||||
//title
|
||||
else if(block.beginsWith("! ")) {
|
||||
auto name = lines.takeLeft().trimLeft("! ", 1L);
|
||||
state.output.append("<h1>", markup(name));
|
||||
for(auto& line : lines) {
|
||||
if(!line.beginsWith("! ")) continue;
|
||||
state.output.append("<span>", markup(line.trimLeft("! ", 1L)), "</span>");
|
||||
}
|
||||
state.output.append("</h1>\n");
|
||||
}
|
||||
|
||||
//section
|
||||
else if(block.beginsWith("# ")) {
|
||||
if(settings.sectioned) {
|
||||
@@ -90,12 +101,12 @@ inline auto DML::parseBlock(string& block, const string& pathname, uint depth) -
|
||||
auto content = lines.takeLeft().trimLeft("# ", 1L).split("::", 1L).strip();
|
||||
auto data = markup(content[0]);
|
||||
auto name = escape(content(1, data.hash()));
|
||||
state.output.append("<h1 id=\"", name, "\">", data);
|
||||
state.output.append("<h2 id=\"", name, "\">", data);
|
||||
for(auto& line : lines) {
|
||||
if(!line.beginsWith("# ")) continue;
|
||||
state.output.append("<span>", line.trimLeft("# ", 1L), "</span>");
|
||||
}
|
||||
state.output.append("</h1>\n");
|
||||
state.output.append("</h2>\n");
|
||||
}
|
||||
|
||||
//header
|
||||
@@ -103,13 +114,13 @@ inline auto DML::parseBlock(string& block, const string& pathname, uint depth) -
|
||||
auto content = slice(lines.takeLeft(), depth + 1).split("::", 1L).strip();
|
||||
auto data = markup(content[0]);
|
||||
auto name = escape(content(1, data.hash()));
|
||||
if(depth <= 5) {
|
||||
state.output.append("<h", depth + 1, " id=\"", name, "\">", data);
|
||||
if(depth <= 4) {
|
||||
state.output.append("<h", depth + 2, " id=\"", name, "\">", data);
|
||||
for(auto& line : lines) {
|
||||
if(count(line, '=') != depth) continue;
|
||||
state.output.append("<span>", slice(line, depth + 1), "</span>");
|
||||
}
|
||||
state.output.append("</h", depth + 1, ">\n");
|
||||
state.output.append("</h", depth + 2, ">\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -69,6 +69,10 @@ auto string_view::operator=(string_view&& source) -> type& {
|
||||
return *this;
|
||||
};
|
||||
|
||||
string_view::operator bool() const {
|
||||
return _size > 0;
|
||||
}
|
||||
|
||||
string_view::operator const char*() const {
|
||||
return _data;
|
||||
}
|
||||
|
Reference in New Issue
Block a user