Closed Bug 563105 Opened 14 years ago Closed 14 years ago

Don't use <tt> in docs

Categories

(Add-on SDK Graveyard :: General, defect)

defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: zpao, Assigned: zpao)

Details

Attachments

(2 files)

<tt> is a bad thing to use. It's like using <big>.

We should be using <code>, which can be markdownified as `code here`

While we're at it, |code strong, code em| shouldn't have a different font-family.
Oh we do this so that we can style the method names, params for the API.

MD doesn't let us style inside `here` but we can at least use <code>, and then MD will still parse inside the block and output styled code.

So (for example)
> <tt>byte-streams.**ByteWriter**(*backingStream*)</tt>
becomes
> <code>byte-streams.**ByteWriter**(*backingStream*)</code>

But for inline cases with no additional markdown
> lorem ipsum <tt>dolor</tt> sit amet
becomes
> lorem ipsum `dolor` sit amet
Pretty much just a find & replace using s/<(/?)(tt)>/<$1code>/ and taking the tt out of the CSS
Attachment #442875 - Flags: review?(avarma)
Comment on attachment 442875 [details] [diff] [review]
Part 1 - <code> & CSS

>diff --git a/static-files/index.html b/static-files/index.html
>-    <tt>cfx docs</tt>.
>+    <code><strong>cfx</strong> docs</code>.

Ignore the strong in there (accidentally left it in there while testing something). I've taken it out in part 2.
Comment on attachment 442875 [details] [diff] [review]
Part 1 - <code> & CSS

Ah, I'm a terrible web developer... I think I also used <tt> just because it's less characters to type than <code>. :(

This looks good, thanks for fixing it!

Do you want to push it yourself or should I?
Attachment #442875 - Flags: review?(avarma) → review+
I was actually going to do a part 2 (I have most of it done) which takes any <code>s with no markdown inside to use ``. I'd rather they land together, so I'll probably get that part up today so you can look at it.
Attached patch Part 2 - ``Splinter Review
95% sure I got them all.

Hopefully I didn't break anything. My regex's turned up some false positives & then I also had to undo a few changes it had caught - Turns out that we can't replace <code> inside <table>s because Markdown won't process inside those blocks :/
Assignee: nobody → paul
Status: NEW → ASSIGNED
Attachment #443207 - Flags: review?(avarma)
Comment on attachment 443207 [details] [diff] [review]
Part 2 - ``

Looks good, thanks!!
Attachment #443207 - Flags: review?(avarma) → review+
Pushed http://hg.mozilla.org/labs/jetpack-sdk/rev/83e2223f1621

Folded the two patches here together so that there weren't multiple consecutive changes to the same line.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Severity: normal → trivial
Target Milestone: -- → 0.4
The Add-on SDK is no longer a Mozilla Labs experiment and has become a big enough project to warrant its own Bugzilla product, so the "Add-on SDK" product has been created for it, and I am moving its bugs to that product.

To filter bugmail related to this change, filter on the word "looptid".
Component: Jetpack SDK → General
Product: Mozilla Labs → Add-on SDK
QA Contact: jetpack-sdk → general
Version: Trunk → unspecified
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: