Skip to content
This repository has been archived by the owner on Jul 15, 2019. It is now read-only.

preserve quoting in attribute values #21

Closed
wants to merge 2 commits into from
Closed

Conversation

maditya
Copy link
Contributor

@maditya maditya commented Aug 10, 2015

@adon-at-work @yukinying @neraliu please review!
This is to address #17

@adon-at-work
Copy link
Contributor

my two cents are:

  • type of attrVals is converted from object to array. therefore, <a href="123" sth=1 href="abc">hello</a> will be converted as <a href="123" href="abc">hello</a> as output, whereas the old implementation will generate <a href="abc">hello</a>. i prefer the latter output.
  • when key === "style", double quote is still used.
  • given the original implementation this.attrVals[parser.getAttributeName()] = parser.getAttributeValue();, i thought we could store the value with the appropriate quote (instead of the value), i anticipate the impl can be much cleaner and faster.

not sure whether i explain it clear enough here. let me make a commit to address what i proposed here.

@yahoocla
Copy link

CLA is valid!

@adon-at-work adon-at-work mentioned this pull request Aug 11, 2015
@maditya maditya deleted the preserve-quoting branch February 18, 2016 21:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants