diff --git a/source/components/Aide.js b/source/components/Aide.js index 77f1bf868..c7cd3df97 100644 --- a/source/components/Aide.js +++ b/source/components/Aide.js @@ -7,6 +7,7 @@ import {EXPLAIN_VARIABLE} from '../actions' import References from './rule/References' import './Aide.css' +import {capitalise0} from '../utils' @connect( state => @@ -39,7 +40,7 @@ export default class Aide extends Component { className="fa fa-times-circle" onClick={stopExplaining} >
+ dangerouslySetInnerHTML={{__html: this.renderExplanationMarkdown(text, rule.titre || capitalise0(rule.name))}}>
{/* { possibilities &&diff --git a/source/components/conversation/validators.js b/source/components/conversation/validators.js index ba3a10e80..4e9a47cef 100644 --- a/source/components/conversation/validators.js +++ b/source/components/conversation/validators.js @@ -9,6 +9,6 @@ export let number = { } export let int = { - test: v => /^[0-9]+/.test(v), + test: v => /^[0-9]+$/.test(v), error: 'Vous devez entrer un entier, par ex. 16' } diff --git a/source/reducers.js b/source/reducers.js index 6d09926c6..50a1b2c28 100644 --- a/source/reducers.js +++ b/source/reducers.js @@ -45,7 +45,8 @@ export let reduceSteps = (tracker, flatRules, answerSource) => (state, action) = ...state, analysedSituation, situationGate: situationGate, - extraSteps: [] + extraSteps: [], + explainedVariable: null } if (action.type == START_CONVERSATION) {