Skip to content

[TE] frontend - harleyjj/yaml-editor - makes yaml autocomplete insert…#3817

Merged
akshayrai merged 1 commit intoapache:masterfrom
harleyjj:yaml-autocomplete
Feb 11, 2019
Merged

[TE] frontend - harleyjj/yaml-editor - makes yaml autocomplete insert…#3817
akshayrai merged 1 commit intoapache:masterfrom
harleyjj:yaml-autocomplete

Conversation

@harleyjj
Copy link
Contributor

@harleyjj harleyjj commented Feb 11, 2019

… dataset field correctly

Detects dataset field regardless of row, and inserts a new row with dataset field if the field is not in the text.

Copy link
Member

@jihaozh jihaozh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the fix

@akshayrai akshayrai merged commit a51d418 into apache:master Feb 11, 2019
// if found, replace with dataset
if (datasetLocation) {
editor.session.replace({
start: { row: datasetLocation.start.row, column: 0},

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make a small helper

_editorReplace(data, replaceStr) {
editor.session.replace({
                      start: { row: data.row, column: 0 },	                  
                      end: { row: data.row, column: Number.MAX_VALUE }},	                     
                    replaceStr);	                    
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants