diff --git a/changelog.md b/changelog.md index 07fcb5136..4426e17f0 100644 --- a/changelog.md +++ b/changelog.md @@ -1,10 +1,12 @@ # changelog -### Tuesday, 17/01/2017 - v2.7cont -- Added in code position to brew page jumping +### Thursday, 19/01/2017 - v2.7.0 +- Fixed saving multiple authors and multiple systems on brew metadata (thanks u/PalaNolho re:282) +- Adding in line highlight for new pages -### Saturday, 14/01/2017 - v2.7.0cont -- - Added a new Render Warning overlay. It detects situations where the brew may not be rendering correctly (wrong browser, browser is zoomed in...) and let's the user know + +### Saturday, 14/01/2017 - v2.7.0 +- Added a new Render Warning overlay. It detects situations where the brew may not be rendering correctly (wrong browser, browser is zoomed in...) and let's the user know ### Sunday, 25/12/2016 - v2.7.0 diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index 6f3d4182e..4ac8772f8 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -73,6 +73,22 @@ const Editor = React.createClass({ return r; }, 1); }, + + highlightPageLines : function(){ + if(!this.refs.codeEditor) return; + const codeMirror = this.refs.codeEditor.codeMirror; + + const lineNumbers = _.reduce(this.props.value.split('\n'), (r, line, lineNumber)=>{ + if(line.indexOf('\\page') !== -1){ + codeMirror.addLineClass(lineNumber, 'background', 'pageLine'); + r.push(lineNumber); + } + return r; + }, []); + return lineNumbers + }, + + brewJump : function(){ const currentPage = this.getCurrentPage(); window.location.hash = 'p' + currentPage; diff --git a/client/homebrew/editor/snippetbar/snippetbar.jsx b/client/homebrew/editor/snippetbar/snippetbar.jsx index 4b2d0f1be..29c6b43ca 100644 --- a/client/homebrew/editor/snippetbar/snippetbar.jsx +++ b/client/homebrew/editor/snippetbar/snippetbar.jsx @@ -44,7 +44,7 @@ const Snippetbar = React.createClass({ {this.renderSnippetGroups()}