summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cnhttp.go18
-rw-r--r--static/style.css3
2 files changed, 5 insertions, 16 deletions
diff --git a/cnhttp.go b/cnhttp.go
index f12074e..29d3cc6 100644
--- a/cnhttp.go
+++ b/cnhttp.go
@@ -406,16 +406,6 @@ func (srv *server) cnpCNMToHTML(w http.ResponseWriter, r *http.Request, req *cnp
}
hdrs := req.Header.String()
hdrs = hdrs[:len(hdrs)-1]
- host, _, _ := net.SplitHostPort(r.Host)
- if host == "" && r.Host != "" {
- host = r.Host
- }
- if host == "" {
- host = r.URL.Hostname()
- }
- if host == "" {
- host = req.Host()
- }
tmpl, err := templates.Clone()
if err != nil {
@@ -432,7 +422,7 @@ func (srv *server) cnpCNMToHTML(w http.ResponseWriter, r *http.Request, req *cnp
Req: breq.String(),
Resp: bresp.String(),
Doc: doc,
- Netcat: shellquote.Join("echo", hdrs) + " | " + shellquote.Join("nc", host, port),
+ Netcat: shellquote.Join("echo", hdrs) + " | " + shellquote.Join("nc", req.Host(), port),
Site: st,
Toc: tocSection{Children: toc},
Highlight: srv.highlighting,
@@ -561,7 +551,7 @@ func (srv *server) handleTags(req *cnp.Request, buf *bytes.Buffer, tags *[]strin
}
close := map[string]bool{
- "em": old.Emphasized && !new.Emphasized,
+ "b": old.Emphasized && !new.Emphasized,
"i": old.Alternate && !new.Alternate,
"code": old.Code && !new.Code,
"q": old.Quote && !new.Quote,
@@ -569,7 +559,7 @@ func (srv *server) handleTags(req *cnp.Request, buf *bytes.Buffer, tags *[]strin
}
open := map[string]bool{
- "em": !old.Emphasized && new.Emphasized,
+ "b": !old.Emphasized && new.Emphasized,
"i": !old.Alternate && new.Alternate,
"code": !old.Code && new.Code,
"q": !old.Quote && new.Quote,
@@ -592,7 +582,7 @@ func (srv *server) handleTags(req *cnp.Request, buf *bytes.Buffer, tags *[]strin
}
*tags = t[:pop]
- tagPush(buf, tags, open, "em", "<em>")
+ tagPush(buf, tags, open, "b", "<b>")
tagPush(buf, tags, open, "i", "<i>")
tagPush(buf, tags, open, "code", "<code>")
tagPush(buf, tags, open, "q", "<q>")
diff --git a/static/style.css b/static/style.css
index 08d6f63..9d6565a 100644
--- a/static/style.css
+++ b/static/style.css
@@ -179,8 +179,7 @@ img {
max-width: 100%;
}
-em {
- font-style: normal;
+b {
font-weight: bold;
}