@nakedcreativity/cee-ms-node 0.3.30 → 0.3.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +8 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -228,7 +228,7 @@ function ceems(config) {
228
228
 
229
229
  this.engine.registerFilter('active', (path, match, cssClass) => {
230
230
 
231
- var regex = new RegExp("^"+match+"$")
231
+ var regex = new RegExp("^"+match+"(?!([a-z0-9\-_]+))")
232
232
 
233
233
  if(regex.test(path)){
234
234
  return cssClass
@@ -592,6 +592,13 @@ ceems.prototype.render = function(req, res, page=null) {
592
592
  if(err){
593
593
  console.log(err)
594
594
  }
595
+
596
+ if(req.query.edit != null){
597
+ var $ = cheerio.load(html);
598
+ $.root().children('body').addClass('cee-ms-edit');
599
+ html = $.html()
600
+ }
601
+
595
602
  //res.header('X-FRAME-OPTIONS', 'allow-from http://localhost:3002');
596
603
  //console.log(res)
597
604
  res.send(html)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nakedcreativity/cee-ms-node",
3
- "version": "0.3.30",
3
+ "version": "0.3.32",
4
4
  "description": "Cee.ms for Node.js",
5
5
  "main": "index.js",
6
6
  "scripts": {