src/eric7/QScintilla/MarkupProviders/RestructuredTextProvider.py

branch
eric7
changeset 11006
a671918232f3
parent 10692
9becf9ca115c
child 11090
f5f5f5803935
equal deleted inserted replaced
11005:b918c6c2736b 11006:a671918232f3
205 from .HyperlinkMarkupDialog import HyperlinkMarkupDialog 205 from .HyperlinkMarkupDialog import HyperlinkMarkupDialog
206 206
207 if editor is None: 207 if editor is None:
208 return 208 return
209 209
210 dlg = HyperlinkMarkupDialog(False, True, noTitle=True) 210 dlg = HyperlinkMarkupDialog(False, True, noTitle=True, parent=editor)
211 if dlg.exec() == QDialog.DialogCode.Accepted: 211 if dlg.exec() == QDialog.DialogCode.Accepted:
212 text, target, _ = dlg.getData() 212 text, target, _ = dlg.getData()
213 213
214 link1 = "`{0}`_".format(text) 214 link1 = "`{0}`_".format(text)
215 link2 = ".. _`{0}`:".format(text) 215 link2 = ".. _`{0}`:".format(text)
322 from .ImageMarkupDialog import ImageMarkupDialog, ImageMarkupMode 322 from .ImageMarkupDialog import ImageMarkupDialog, ImageMarkupMode
323 323
324 if editor is None: 324 if editor is None:
325 return 325 return
326 326
327 dlg = ImageMarkupDialog(ImageMarkupMode.Rest) 327 dlg = ImageMarkupDialog(ImageMarkupMode.Rest, parent=editor)
328 if dlg.exec() == QDialog.DialogCode.Accepted: 328 if dlg.exec() == QDialog.DialogCode.Accepted:
329 address, altText, _title, originalSize, width, height = dlg.getData() 329 address, altText, _title, originalSize, width, height = dlg.getData()
330 330
331 lineSeparator = editor.getLineSeparator() 331 lineSeparator = editor.getLineSeparator()
332 markup = ".. image:: {0}{1}".format(address, lineSeparator) 332 markup = ".. image:: {0}{1}".format(address, lineSeparator)

eric ide

mercurial