Skip to content

Commit

Permalink
[convert-contact-forms] fix re-ordering if -create/-edit suffix not p…
Browse files Browse the repository at this point in the history
…resent

Closes #57
  • Loading branch information
alxndrsn committed Feb 6, 2018
1 parent d0ae4c3 commit 8dc4e22
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "medic-conf",
"version": "1.11.1",
"version": "1.11.2",
"description": "Configure Medic Mobile deployments",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/fn/convert-contact-forms.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = (projectDir, couchUrl, extras) => {
force_data_node: 'data',
forms: extras,
transformer: (xml, path) => {
const type = path.replace(/.*\/(.*)-(create|edit)\.xml/, '$1');
const type = path.replace(/.*\/(.*?)(-(create|edit))?\.xml/, '$1');

if(PLACE_TYPES) {
xml = xml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
<district_name/>
</contact>
</inputs>
<district_hospital>
<name/>
</district_hospital>
<contact>
<debug_note/>
<name/>
</contact>
<contact_notes/>
<district_hospital>
<name/>
</district_hospital>
<meta>
<instanceID/>
</meta>
Expand Down

0 comments on commit 8dc4e22

Please sign in to comment.