aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ08nY2020-08-12 22:35:12 +0200
committerJ08nY2020-08-12 22:35:12 +0200
commite4fa4e7ef5a6fa310758821274dd6c8b59190a7e (patch)
tree24e8c672aec8a642d809df6df33fa1c257813b1c
parent689d3fa28d3fa4cab36c96d4f92f19343ca88e90 (diff)
downloadstd-curves-e4fa4e7ef5a6fa310758821274dd6c8b59190a7e.tar.gz
std-curves-e4fa4e7ef5a6fa310758821274dd6c8b59190a7e.tar.zst
std-curves-e4fa4e7ef5a6fa310758821274dd6c8b59190a7e.zip
Add markdown rendering to curve desc.
-rw-r--r--src/pages/index.js5
-rw-r--r--src/templates/curve.js3
2 files changed, 7 insertions, 1 deletions
diff --git a/src/pages/index.js b/src/pages/index.js
index aba51d4..23f2dd1 100644
--- a/src/pages/index.js
+++ b/src/pages/index.js
@@ -69,6 +69,11 @@ export default ({data, location}) => {
are correct, however mistakes could have happened on data import and thus double-checking
with the source document is recommended. The database currently contains <b>{allCurves}</b> curves, out of which <b>{uniqueCurves}</b> are unique.
</p>
+ <h4>Authors</h4>
+ <ul>
+ <li>Ján Jančár</li>
+ <li>Vladimír Sedláček</li>
+ </ul>
<p>
Thanks to Jan Dušátko for providing some of the curve data.
</p>
diff --git a/src/templates/curve.js b/src/templates/curve.js
index 6dfec70..7777ae8 100644
--- a/src/templates/curve.js
+++ b/src/templates/curve.js
@@ -4,6 +4,7 @@ import Link from '../components/Link'
import Entry from '../components/entry'
import LinkButton from '../components/LinkButton'
import CopyButton from '../components/CopyButton'
+import ReactMarkdown from "react-markdown"
import { clean_dict, is_nullundef } from '../utils'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faDownload, faCopy, faSquare } from '@fortawesome/free-solid-svg-icons'
@@ -411,7 +412,7 @@ export default ({ data, location, pageContext }) => {
<Entry location={location} title={pageContext.name}>
<h2>{pageContext.name}</h2>
{data.curve.field.bits}-bit {data.curve.field.type.toLowerCase()} field {data.curve.form} curve.<br/>
- {is_nullundef(data.curve.desc) || data.curve.desc === "" ? null : <div>{data.curve.desc}<br/></div>}
+ {is_nullundef(data.curve.desc) || data.curve.desc === "" ? null : <div><ReactMarkdown source={data.curve.desc} renderers={{link: Link}}/><br/></div>}
{aliases}
{equation}
{dataTable}