mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 16:21:11 +00:00
Use white-space: pre-wrap instead of non-breaking spaces
This commit is contained in:
parent
7c50f3d5c4
commit
5a90a6ac4f
2 changed files with 13 additions and 2 deletions
|
@ -109,7 +109,14 @@ fn render_main_content(module: &ModuleDocumentation) -> String {
|
||||||
type_annotation_to_html(0, &mut content, &type_ann);
|
type_annotation_to_html(0, &mut content, &type_ann);
|
||||||
}
|
}
|
||||||
|
|
||||||
buf.push_str(html_node("h3", vec![("id", name)], content.as_str()).as_str());
|
buf.push_str(
|
||||||
|
html_node(
|
||||||
|
"h3",
|
||||||
|
vec![("id", name), ("class", "entry-name")],
|
||||||
|
content.as_str(),
|
||||||
|
)
|
||||||
|
.as_str(),
|
||||||
|
);
|
||||||
|
|
||||||
if let Some(docs) = &entry.docs {
|
if let Some(docs) = &entry.docs {
|
||||||
buf.push_str(markdown_to_html(docs.to_string()).as_str());
|
buf.push_str(markdown_to_html(docs.to_string()).as_str());
|
||||||
|
@ -283,7 +290,7 @@ pub fn files_to_documentations(
|
||||||
files_docs
|
files_docs
|
||||||
}
|
}
|
||||||
|
|
||||||
const INDENT: &str = " ";
|
const INDENT: &str = " ";
|
||||||
|
|
||||||
fn indent(buf: &mut String, times: usize) {
|
fn indent(buf: &mut String, times: usize) {
|
||||||
for _ in 0..times {
|
for _ in 0..times {
|
||||||
|
|
|
@ -52,6 +52,10 @@ a {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.entry-name {
|
||||||
|
white-space: pre-wrap;
|
||||||
|
}
|
||||||
|
|
||||||
.pkg-full-name a {
|
.pkg-full-name a {
|
||||||
padding-top: 12px;
|
padding-top: 12px;
|
||||||
padding-bottom: 16px;
|
padding-bottom: 16px;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue