Timeline for Translate BBCode into HTML
Current License: CC BY-SA 4.0
Post Revisions
29 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| 13 hours ago | answer | added | qarz | timeline score: 0 | |
| yesterday | comment | added | qarz | @UnrelatedString Good question. This is a difficult call but I'm just gonna go with the safe answer and say that that falls under no bad nesting. | |
| yesterday | comment | added | Unrelated String | Are unmatched tags permitted inside matched tags, or does this fall under no bad nesting? | |
| yesterday | answer | added | Arnauld | timeline score: 2 | |
| yesterday | comment | added | Arnauld | It's probably too late to update the challenge, but I really wish that the input was guaranteed to be valid BB code. I think there are currently many ambiguous edge cases. | |
| yesterday | comment | added | Arnauld |
May the input contain valid tags with an invalid syntax such as [b=foo]hello[/b]? And if yes, what are we supposed to do with them?
|
|
| yesterday | comment | added | Themoonisacheese | @tata for the first one: this was raised in the sandbox. badly nested tags are guaranteed not to be present for this reason. for the second one, i agree that it could be ambiguous, but most regular bbcode interpreters behave like the test cases. | |
| yesterday | answer | added | mastaH | timeline score: 4 | |
| 2 days ago | comment | added | tata |
Shouldn't [code][code]nested code[/code][/code] output<code>[code]nested code</code>[/code] instead of <code>[code]nested code[/code]</code>?
|
|
| 2 days ago | comment | added | tata |
"Unmatched, malformed, or unknown tags are left as literal text" is unclear. Consider [b][i]Text[/b][/i]. Should it be <b>[i]Text</b>[/i] or [b]<i>Text</b]</i> or even [b][i]Text[/b][/i]?
|
|
| 2 days ago | history | edited | qarz | CC BY-SA 4.0 |
added test case
|
| 2 days ago | comment | added | qarz | @Arnauld good one, adding | |
| 2 days ago | comment | added | Arnauld |
Suggested test case: [code]left[/code][code]right[/code]
|
|
| 2 days ago | answer | added | qarz | timeline score: 1 | |
| 2 days ago | comment | added | qarz | @Themoonisacheese added | |
| 2 days ago | history | edited | qarz | CC BY-SA 4.0 |
ce
|
| 2 days ago | comment | added | Themoonisacheese |
you're missing a test case for [u] by the way
|
|
| 2 days ago | history | became hot network question | |||
| 2 days ago | answer | added | Themoonisacheese | timeline score: 4 | |
| 2 days ago | comment | added | Explorer09 |
@Themoonisacheese Actually I think Markdown has superceded BBCode for most of the markup content online, but that doesn't mean semantic is not important. E.g. the marking of book titles with <em> like <em>The Lord of the Rings</em> was an error. But in BBCode where there's no <cite> element, <i> becomes a better alternative than <em>.
|
|
| Jan 29 at 9:16 | comment | added | Themoonisacheese | @Explorer09 i don't think it's very relevant to be pedantic about semantic html when we're talking about software that is nowadays largely considered obsolete, used for informal conversation by non-technical users. | |
| Jan 29 at 8:56 | comment | added | Explorer09 |
@qarz <strong> and <b> have different semantics in HTML5 and are not interchangeable. <b> is for general marker for drawing attention or keywords. <strong> is for making importance in text/speech. The **this** in Markdown translates better to <b> and not <strong>. Likewise for <i> (general marker for loanwords, scientific terms and titles) and <em> (stress or emphasis in speech). See also: FAQ from WHATWG
|
|
| Jan 29 at 5:00 | history | edited | qarz | CC BY-SA 4.0 |
clarification
|
| Jan 29 at 4:59 | comment | added | qarz |
@Arnauld Apologies, English ambiguity: I meant that input attributes and input text inside (valid) tags will not contain [, ]. Will edit
|
|
| Jan 29 at 4:56 | comment | added | Arnauld |
text will never contain [, ] seems to contradict malformed, or unknown tags are left as literal text.
|
|
| Jan 29 at 4:51 | comment | added | Arnauld |
@Explorer09 www.bbcode.org does translate [b] into <strong> and [i] into <em>. And so does Markdown on this very site with **this** and *this*.
|
|
| Jan 29 at 4:48 | comment | added | qarz |
@Explorer09 The HTML5 spec says that "[t]he b element should be used as a last resort when no other element is more appropriate" and that "[a]uthors are encouraged to consider whether other elements might be more applicable than the i element, for instance the em element for marking up stress emphasis". For something where semantic meaning is impractical to consider (e.g. user generated content, what BBCode is overwhelmingly used for), I think <strong> and <em> are the safe, modern choices.
|
|
| Jan 29 at 4:05 | comment | added | Explorer09 |
HTML has <b> and <i> tags and they are semantically different from <strong> and <em>. Not requesting to change rules, but why do you define the mapping that way?
|
|
| Jan 29 at 0:58 | history | asked | qarz | CC BY-SA 4.0 |