{"action":"closed","issue":{"url":"https://api.github.com/repos/bhavyanshu/LightMd_Editor/issues/9","labels_url":"https://api.github.com/repos/bhavyanshu/LightMd_Editor/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/bhavyanshu/LightMd_Editor/issues/9/comments","events_url":"https://api.github.com/repos/bhavyanshu/LightMd_Editor/issues/9/events","html_url":"https://github.com/bhavyanshu/LightMd_Editor/issues/9","id":100505286,"number":9,"title":"Syntax doesn't highlight while typing new text until theme toggled","user":{"login":"bhavyanshu","id":3829459,"avatar_url":"https://avatars.githubusercontent.com/u/3829459?v=3","gravatar_id":"","url":"https://api.github.com/users/bhavyanshu","html_url":"https://github.com/bhavyanshu","followers_url":"https://api.github.com/users/bhavyanshu/followers","following_url":"https://api.github.com/users/bhavyanshu/following{/other_user}","gists_url":"https://api.github.com/users/bhavyanshu/gists{/gist_id}","starred_url":"https://api.github.com/users/bhavyanshu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhavyanshu/subscriptions","organizations_url":"https://api.github.com/users/bhavyanshu/orgs","repos_url":"https://api.github.com/users/bhavyanshu/repos","events_url":"https://api.github.com/users/bhavyanshu/events{/privacy}","received_events_url":"https://api.github.com/users/bhavyanshu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-12T09:41:54Z","updated_at":"2015-08-12T11:06:58Z","closed_at":"2015-08-12T11:06:58Z","body":"Releasing an update soon which fixes this issue.\r\n\r\n```c++\r\nvoid MainWindow::documentWasModified()\r\n{\r\n    QPlainTextEdit *te = qobject_cast<QPlainTextEdit*>(ui->tabWidget->currentWidget());\r\n    //int index = ui->tabWidget->currentIndex();\r\n    highlighter = new HGMarkdownHighlighter(te->document(), 1000);\r\n    if(themeState==false) {\r\n        QString styleFilePath = \":/styles/markdown-dark.style\";\r\n        highlighter->getStylesFromStylesheet(styleFilePath, te);\r\n    }\r\n    else {\r\n        QString styleFilePath = \":/styles/markdown-light.style\";\r\n        highlighter->getStylesFromStylesheet(styleFilePath, te);\r\n    }\r\n    highlighter->highlightNow();\r\n    highlighter->parseAndHighlightNow();\r\n\r\n    if(te->document()->isModified()) {\r\n        statusBar()->showMessage(tr(\"Document has unsaved changes\"), 2000);\r\n    }\r\n}\r\n```"}}