Skip to content

Commit

Permalink
replace : with - in css ids
Browse files Browse the repository at this point in the history
  • Loading branch information
jedahu committed Mar 15, 2013
1 parent 2050013 commit 8188828
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "docshop",
"version": "0.1.61",
"version": "0.1.63",
"dependencies": {
"grunt-contrib-copy": "~0.4.0rc7",
"grunt-contrib-watch": "~0.1.4",
Expand Down
6 changes: 6 additions & 0 deletions www/css/browse.styl
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,12 @@ ul
.name
color black

.ds-name
font-weight bold
.ds-info
color grey
font-weight normal

code
color inherit
padding none
Expand Down
3 changes: 1 addition & 2 deletions www/docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@
<ul>
<li
data-ng-repeat='n in renderedSrc.names'
data-ng-click-scroll-to='"id:" + n'
data-ng-click='scrollToHash("id:" + n)'
data-ng-click='scrollToHash("ds-name-" + n)'
data-ng-bind='n'>
</li>
</ul>
Expand Down
4 changes: 2 additions & 2 deletions www/js/app/browse/service/parse_render_src.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
.replace(/(?:\n\s*)*$/, '')
}
; const names = [].map.call
( wrapper.find('[id^="name:"]')
, (elm) => elm.getAttribute('id').slice('name:'.length)
( wrapper.find('[id^="ds-name-"]')
, (elm) => elm.getAttribute('id').slice('ds-name-'.length)
)
.sort()
; const toc = [].slice.call(wrapper.find('h1,h2,h3,h4'), 0)
Expand Down
4 changes: 2 additions & 2 deletions www/js/app/browse/service/src_parser/directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ containing that string and with an id of "name:`name`".
{ export const name = (str) =>
{ const [_, name, info] = /^(\S+)(?:\s+(.+))?$/.exec(str) || []
; const infoSpan = info
? ' <span class="ds:info">'
? ' <span class="ds-info">'
+ escapeHtml(info)
+ '</span>'
: ''
; return '<div class="ds:name" id="name:'
; return '<div class="ds-name" id="ds-name-'
+ escapeHtml(name)
+ '">'
+ escapeHtml(name)
Expand Down

0 comments on commit 8188828

Please sign in to comment.