kemayo / sublime-text-2-goto-documentation

Sublime Text 2 plugin to go to documentation
128 stars 37 forks source link

Support for CSS using Mozilla Developer Network (MDN) #35

Closed druellan closed 10 years ago

druellan commented 10 years ago

Ported from the cssDOC plugin (https://sublime.wbond.net/packages/cssDOC), using MDN to link documentation. Works pretty well and Mozilla is doing a complete revision of their documentation. Kudos to @chrissimpkins for the idea.

chrissimpkins commented 10 years ago

@druellan : Note that the URL that you submitted in this pull request:

http://developer.mozilla.org/en-US/docs/Web/CSS/{keyword}

requires a supported keyword to identify the file. If there are extra spaces/colons/or it is simply not a CSS entity, then you'll get a 404 page. If you are looking for search, it is the following URL:

http://developer.mozilla.org/en-US/search?q={keyword}&topic=css.

I am using the second one as a fallback if the user's request doesn't parse to an actual CSS entity. Feel free to grab and use the Python list in my project (contains all of the CSS entities from the MDN site) if it is helpful to you.

Hope it helps, C

druellan commented 10 years ago

Thanks Chris, In truth, didn't want to rip-off your code, but now that I have your blessing, I'll try to integrate it. Thanks again.

chrissimpkins commented 10 years ago

No worries at all. Hope the code helps.

C

druellan commented 10 years ago

Yes, but I think I'll leave it as is, since it is more or less the same thing other implementations are doing. I don't want to introduce better string sanitization and detection just for CSS: this should be implemented on the plugin itself. In sum, I think it is ok. Perhaps @kemayo can give us some input about that.

royduin commented 10 years ago

This is what I'm looking for, can this be added in the next version?