Skip to content

Commit

Permalink
Merge pull request #335 from nickgros/PORTALS-2701c
Browse files Browse the repository at this point in the history
  • Loading branch information
nickgros authored Jun 29, 2023
2 parents 7c6cc0e + b15514e commit 094e038
Show file tree
Hide file tree
Showing 27 changed files with 3,856 additions and 226 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@ export const publicationsSql = 'SELECT * FROM syn20448807'
export const studiesSql = 'SELECT * FROM syn17083367 ORDER BY isFeatured DESC'
export const programsSql = 'SELECT * FROM syn17024173'

export const experimentalModelsSql = 'select * from syn22219805 ORDER BY isFeatured DESC'
export const experimentalModelsSql =
'select * from syn22219805 ORDER BY isFeatured DESC'

// PORTALS-2028: /MODEL-ADstrains redirects to "/Explore/Experimental Models" with this facet preselected
export const modelADStrainsSelectedFacet = {columnName: 'program', facetValue: 'MODEL-AD'}
export const modelADStrainsSelectedFacet = {
columnName: 'program',
facetValue: 'MODEL-AD',
}

// Convert the `title` column to markdown, linking to the `link` column
export const targetEnablingResourcesExploreSql =
Expand Down
9 changes: 3 additions & 6 deletions packages/markdown-it-synapse/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@

> Synapse tag plugin for [markdown-it](https://github.com/markdown-it/markdown-it) markdown parser.
__v1.+ requires `markdown-it` v4.+, see changelog.__
**v1.+ requires `markdown-it` v4.+, see changelog.**

`${image?fileName=joy%2Epng&align=None}` => `<span id="widget-0my-unique-div-id" class="widgetContainer" widgetparams="image?fileName=joy%2Epng&amp;align=None" />`


## Install

node.js, browser:
Expand All @@ -23,18 +22,16 @@ bower install markdown-it-synapse --save
## Use

```js
var md = require('markdown-it')()
.use(require('markdown-it-synapse'));
var md = require('markdown-it')().use(require('markdown-it-synapse'))

md.render('${image?fileName=joy%2Epng&align=None}', 'my-unique-div-id') // => '<span id="widget-0my-unique-div-id" class="widgetContainer" widgetparams="image?fileName=joy%2Epng&amp;align=None" />'

```

The widgetparams can be used to determine what kind of html widget should be rendered in the output container.

_Differences in browser._ If you load script directly into the page, without
package system, module will add itself globally as `window.markdownitSynapse`.


## License

[MIT](https://github.com/jay-hodgson/markdown-it-synapse/blob/master/LICENSE)
18 changes: 9 additions & 9 deletions packages/markdown-it-synapse/test/test.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
"use strict";
'use strict'

// TODO: these are parsed incorrectly:
//
// ~~~foo~~~
// ~~~foo~ bar~~

var path = require("path");
var generate = require("markdown-it-testgen");
var synapseMarkdownIt = require("../dist/");
var md = require("markdown-it")().use(synapseMarkdownIt);
synapseMarkdownIt.init_markdown_it(md);
var path = require('path')
var generate = require('markdown-it-testgen')
var synapseMarkdownIt = require('../dist/')
var md = require('markdown-it')().use(synapseMarkdownIt)
synapseMarkdownIt.init_markdown_it(md)

describe("markdown-it-synapse", function () {
describe('markdown-it-synapse', function () {
// eslint-disable-next-line mocha/no-setup-in-describe
generate(path.join(__dirname, "fixtures/synapse.txt"), md);
});
generate(path.join(__dirname, 'fixtures/synapse.txt'), md)
})
Loading

0 comments on commit 094e038

Please sign in to comment.