-
-
Notifications
You must be signed in to change notification settings - Fork 784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
html converter next low-hanging-fruit #4235
html converter next low-hanging-fruit #4235
Conversation
34ca938
to
d5f3f02
Compare
6d430ad
to
cc54232
Compare
Thanks @redbow-kimee! It would be easier to review your contribution if each |
end | ||
|
||
def convert_inline_button node | ||
%(<samp class="button">#{node.text}</samp>) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think <samp>
is the right element to represent a button. MDN says:
The <samp> element is used to enclose inline text which represents sample (or quoted) output from a computer program.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/samp
Having said that, I don't have a good alternative.
Currently, we are using <b>
... I guess we could use <span>
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, this one is tough, samp
wasn't perfect, and I think b
matches a bit less. span class="button"
or something might be the "right" solution.
end | ||
|
||
def convert_inline_break node | ||
%(#{node.text}<br />) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An open question is whether we want to support XHTML or not. And if we want to support XHTML, should we always use /
on void elements or use an option. Currently, we have an option named htmlsyntax
to control if we should add /
or not.
May I ask with the extra space? <br />
instead of <br/>
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct me if I'm wrong but XHTML5 is trivially HTML5, no? (maybe except some doctype nonsense). (I've been quite removed from web stuff for a while, so I'm probably rusty on this stuff).
As for <br />
vs. <br/>
, I have no opinion, other than I've always put a
personally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's mostly about adding a slash to close tags. For instance: <br>
is valid HTML5 but invalid XHTML.
Sorry for the delay. What I'll do for now is isolate each of the |
@Mogztter I believe I've either successfully isolated each converter (in the case of images, pair of converters) to its own branch, Except for |
704cccd
to
23e117f
Compare
2a61336
to
97a64ba
Compare
Thanks for your patience, I'm slowing merging your changes 🚋 |
66acc1a
to
8f9359b
Compare
…can't claim too much credit for these as they're largely copied from the original HTML converter with a few tags changed
97a64ba
to
f830c18
Compare
We can now close this pull request, I've extracted the remaining
|
No description provided.