D18475: Add AsciiDoc support

2019-01-29 Thread Andreas Gratzer
andreasgr added a comment.


  In D18475#401517 , @dhaumann wrote:
  
  > 1. I apply your patch: arc patch D18475 
  
  
  Thanks for the information.
  And many thanks for your time spent on reviewing.
  
  Cheers

REPOSITORY
  R216 Syntax Highlighting

REVISION DETAIL
  https://phabricator.kde.org/D18475

To: andreasgr, #framework_syntax_highlighting, dhaumann
Cc: dhaumann, nibags, kwrite-devel, kde-frameworks-devel, 
#framework_syntax_highlighting, bmortimer, hase, michaelh, genethomas, ngraham, 
bruns, demsking, cullmann, vkrause, sars


D18475: Add AsciiDoc support

2019-01-28 Thread Dominik Haumann
This revision was automatically updated to reflect the committed changes.
Closed by commit R216:de5fc35624d2: Add AsciiDoc support (authored by dhaumann).

CHANGED PRIOR TO COMMIT
  https://phabricator.kde.org/D18475?vs=50391=50453#toc

REPOSITORY
  R216 Syntax Highlighting

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D18475?vs=50391=50453

REVISION DETAIL
  https://phabricator.kde.org/D18475

AFFECTED FILES
  autotests/folding/asciidoc.adoc.fold
  autotests/html/asciidoc.adoc.html
  autotests/input/asciidoc.adoc
  autotests/reference/asciidoc.adoc.ref
  data/syntax/asciidoc.xml

To: andreasgr, #framework_syntax_highlighting, dhaumann
Cc: dhaumann, nibags, kwrite-devel, kde-frameworks-devel, 
#framework_syntax_highlighting, bmortimer, hase, michaelh, genethomas, ngraham, 
bruns, demsking, cullmann, vkrause, sars


D18475: Add AsciiDoc support

2019-01-28 Thread Dominik Haumann
dhaumann accepted this revision.
dhaumann added a comment.
This revision is now accepted and ready to land.


  1. I apply your patch: arc patch D18475 
  2. Since there is a new syntax highlighting file, I do: touch 
data/syntax-data.qrc.in
  3. I switch to the build directory, type make -j4 install
  4. I run the tests, some fail, since the reference of your test file is 
missing
  5. In the build folder, I run: ./autotests/update-reference-data.sh
  6. Now git status tells me there are several untracked files:
- autotests/folding/asciidoc.adoc.fold
- autotests/html/asciidoc.adoc.html
- autotests/reference/asciidoc.adoc.ref
  7. In the source folder, I git add all these files, then commit
  8. Finally, I call: arc diff to land your patch

REPOSITORY
  R216 Syntax Highlighting

REVISION DETAIL
  https://phabricator.kde.org/D18475

To: andreasgr, #framework_syntax_highlighting, dhaumann
Cc: dhaumann, nibags, kwrite-devel, kde-frameworks-devel, 
#framework_syntax_highlighting, bmortimer, hase, michaelh, genethomas, ngraham, 
bruns, demsking, cullmann, vkrause, sars


D18475: Add AsciiDoc support

2019-01-28 Thread Andreas Gratzer
andreasgr added a comment.


  In D18475#400238 , @nibags wrote:
  
  > Hi!!
  >  Please, also add a test file in: "autotests/input/". To generate the files 
in "folding", "html" and "reference" use `make test` and 
`autotests/update-reference-data.sh`.
  
  
  I tried to understand how the testing works, but I failed.
  
  `make test` complains about one test failed with latest master branch.
  It complains about more failed tests after I added the AsciiDoc files.
  I does not give hints about what's wrong, though.
  
  Is there a guide somewhere about how to support testing  of syntax 
highlighting?

REPOSITORY
  R216 Syntax Highlighting

REVISION DETAIL
  https://phabricator.kde.org/D18475

To: andreasgr, #framework_syntax_highlighting
Cc: dhaumann, nibags, kwrite-devel, kde-frameworks-devel, 
#framework_syntax_highlighting, bmortimer, hase, michaelh, genethomas, ngraham, 
bruns, demsking, cullmann, vkrause, sars


D18475: Add AsciiDoc support

2019-01-28 Thread Andreas Gratzer
andreasgr added a comment.


  In D18475#400989 , @nibags wrote:
  
  > If you are only going to use the "admonition" keywords list for 
autocompletion, you could add them to the end of the context "section" or 
"start", keeping the attribute (Normal).
  
  
  Thanks for the tip.
  I think its not that important, though.

REPOSITORY
  R216 Syntax Highlighting

REVISION DETAIL
  https://phabricator.kde.org/D18475

To: andreasgr, #framework_syntax_highlighting
Cc: dhaumann, nibags, kwrite-devel, kde-frameworks-devel, 
#framework_syntax_highlighting, bmortimer, hase, michaelh, genethomas, ngraham, 
bruns, demsking, cullmann, vkrause, sars


D18475: Add AsciiDoc support

2019-01-27 Thread Nibaldo González
nibags added a comment.


  If you are only going to use the "admonition" keywords list for 
autocompletion, you could add them to the end of the context "section" or 
"start", keeping the attribute (Normal). I have done this in some highlight 
files

REPOSITORY
  R216 Syntax Highlighting

REVISION DETAIL
  https://phabricator.kde.org/D18475

To: andreasgr, #framework_syntax_highlighting
Cc: dhaumann, nibags, kwrite-devel, kde-frameworks-devel, 
#framework_syntax_highlighting, bmortimer, hase, michaelh, genethomas, ngraham, 
bruns, demsking, cullmann, vkrause, sars


D18475: Add AsciiDoc support

2019-01-27 Thread Andreas Gratzer
andreasgr updated this revision to Diff 50391.
andreasgr added a comment.


  Fix diff.

REPOSITORY
  R216 Syntax Highlighting

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D18475?vs=50390=50391

REVISION DETAIL
  https://phabricator.kde.org/D18475

AFFECTED FILES
  autotests/input/asciidoc.adoc
  data/syntax/asciidoc.xml

To: andreasgr, #framework_syntax_highlighting
Cc: dhaumann, nibags, kwrite-devel, kde-frameworks-devel, 
#framework_syntax_highlighting, bmortimer, hase, michaelh, genethomas, ngraham, 
bruns, demsking, cullmann, vkrause, sars


D18475: Add AsciiDoc support

2019-01-27 Thread Andreas Gratzer
andreasgr updated this revision to Diff 50390.
andreasgr added a comment.


  - Added test AsciiDoc.

REPOSITORY
  R216 Syntax Highlighting

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D18475?vs=50388=50390

REVISION DETAIL
  https://phabricator.kde.org/D18475

AFFECTED FILES
  autotests/input/asciidoc.adoc

To: andreasgr, #framework_syntax_highlighting
Cc: dhaumann, nibags, kwrite-devel, kde-frameworks-devel, 
#framework_syntax_highlighting, bmortimer, hase, michaelh, genethomas, ngraham, 
bruns, demsking, cullmann, vkrause, sars


D18475: Add AsciiDoc support

2019-01-27 Thread Andreas Gratzer
andreasgr updated this revision to Diff 50388.
andreasgr added a comment.


  - Drop unused 'admonition' keyword list.
  - Rename itemData elements to start with capital letters.
  - Enable escaping in block and section titles.

REPOSITORY
  R216 Syntax Highlighting

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D18475?vs=50382=50388

REVISION DETAIL
  https://phabricator.kde.org/D18475

AFFECTED FILES
  data/syntax/asciidoc.xml

To: andreasgr, #framework_syntax_highlighting
Cc: dhaumann, nibags, kwrite-devel, kde-frameworks-devel, 
#framework_syntax_highlighting, bmortimer, hase, michaelh, genethomas, ngraham, 
bruns, demsking, cullmann, vkrause, sars


D18475: Add AsciiDoc support

2019-01-27 Thread Andreas Gratzer
andreasgr added a comment.


  In D18475#400893 , @dhaumann wrote:
  
  > Running the katesyntaxhighlighting indexer tells me:
  >
  >   katehighlightingindexer::KeywordChecker::check: 
"syntax-highlighting/data/syntax/asciidoc.xml" Unused keyword lists: 
"admonition"
  >   
  >
  > Could you fix this? Usually, keyword completion should be context dependent 
anyways (currently a bug), so soon your unused list will indeed not have any 
effect.
  
  
  OK, I will remove it.
  I just added it as this supports word completion.
  
  > Besides: If you want to support specials like TODO, NOTE, ..., then please 
use IncludeRules and ##Alert (look into other files how it's done).
  
  These 'admonitions' are a different thing.
  They are a feature of AsciiDoc, have to align to specific formats and are 
rendered in the output (see 
https://asciidoctor.org/docs/user-manual/#admonition).
  
  Using alerts in comments is already supported the way you described.
  
  > Also, could you please change all itemData names to upper case naming? Eg. 
"replacement" -> "Replacement",  or "section title" -> Section Title", etc? All 
other highlighting files use this naming scheme, and it will be visible in the 
UI later when configuring the colors in Kate.
  
  Sure, no problem.
  
  > And what's still missing is a test file, also best licensed under MIT, that 
we can use for regression testing.
  
  Working on it.
  I understand a single AsciiDoc is expected?
  I have a set of 22 AsciiDocs I used for testing while creating the 
highlighting support and another one describing the things I know are 
currrently not working.
  At the moment I am merging them into a single one.
  
  Thanks for your feedback :)

REPOSITORY
  R216 Syntax Highlighting

REVISION DETAIL
  https://phabricator.kde.org/D18475

To: andreasgr, #framework_syntax_highlighting
Cc: dhaumann, nibags, kwrite-devel, kde-frameworks-devel, 
#framework_syntax_highlighting, bmortimer, hase, michaelh, genethomas, ngraham, 
bruns, demsking, cullmann, vkrause, sars


D18475: Add AsciiDoc support

2019-01-27 Thread Dominik Haumann
dhaumann added a comment.


  Running the katesyntaxhighlighting indexer tells me:
  
katehighlightingindexer::KeywordChecker::check: 
"syntax-highlighting/data/syntax/asciidoc.xml" Unused keyword lists: 
"admonition"
  
  Could you fix this? Usually, keyword completion should be context dependent 
anyways (currently a bug), so soon your unused list will indeed not have any 
effect. Besides: If you want to support specials like TODO, NOTE, ..., then 
please use IncludeRules and ##Alert (look into other files how it's done).
  
  Also, could you please change all itemData names to upper case naming? Eg. 
"replacement" -> "Replacement",  or "section title" -> Section Title", etc? All 
other highlighting files use this naming scheme, and it will be visible in the 
UI later when configuring the colors in Kate.
  
  And what's still missing is a test file, also best licensed under MIT, that 
we can use for regression testing.

REPOSITORY
  R216 Syntax Highlighting

REVISION DETAIL
  https://phabricator.kde.org/D18475

To: andreasgr, #framework_syntax_highlighting
Cc: dhaumann, nibags, kwrite-devel, kde-frameworks-devel, 
#framework_syntax_highlighting, bmortimer, hase, michaelh, genethomas, ngraham, 
bruns, demsking, cullmann, vkrause, sars


D18475: Add AsciiDoc support

2019-01-27 Thread Andreas Gratzer
andreasgr updated this revision to Diff 50382.
andreasgr added a comment.


  Drop custom colors and backgrounds.

REPOSITORY
  R216 Syntax Highlighting

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D18475?vs=50263=50382

REVISION DETAIL
  https://phabricator.kde.org/D18475

AFFECTED FILES
  data/syntax/asciidoc.xml

To: andreasgr, #framework_syntax_highlighting
Cc: dhaumann, nibags, kwrite-devel, kde-frameworks-devel, 
#framework_syntax_highlighting, bmortimer, hase, michaelh, genethomas, ngraham, 
bruns, demsking, cullmann, vkrause, sars


D18475: Add AsciiDoc support

2019-01-26 Thread Dominik Haumann
dhaumann added a comment.


  With respect to colors: it's more important to be consistent with other 
highlightings in kate that with AsciiDoctor. Indeed, it would be nice if you 
can avoid any hard coded color.

REPOSITORY
  R216 Syntax Highlighting

REVISION DETAIL
  https://phabricator.kde.org/D18475

To: andreasgr, #framework_syntax_highlighting
Cc: dhaumann, nibags, kwrite-devel, kde-frameworks-devel, 
#framework_syntax_highlighting, bmortimer, hase, michaelh, genethomas, ngraham, 
bruns, demsking, cullmann, vkrause, sars


D18475: Add AsciiDoc support

2019-01-25 Thread Andreas Gratzer
andreasgr added a comment.


  In D18475#400238 , @nibags wrote:
  
  > Hi!!
  >  Please, also add a test file in: "autotests/input/". To generate the files 
in "folding", "html" and "reference" use `make test` and 
`autotests/update-reference-data.sh`.
  >
  > I am not a reviewer, but I want to add some recommendations in relation to 
the itemData's:
  >
  > - On lines 467, 476 and 485 you use harded colors for the fonts. Ideally, 
don't use them, but use the default styles, since a better visualization is 
achieved in the different schemes: 
https://kate-editor.org/2014/03/07/kate-part-kf5-new-default-styles-for-better-color-schemes/
  > - On lines 469 & 471 you use background color, and on lines 466-467, 
473-474, 479-481 and 490 you use background color, but not font color. Try not 
to use background color if it's not necessary,  to get a better visualization 
in the different schemes. However, if you need background color, it also 
specifies the font color, to avoid readability problems in some color schemes 
(for example, the background color `_bg;` with `dsNormal` is not 
readable in dark schemes).
  
  
  Hi @nibags,
  
  many thanks for your feedback.
  
  I will see what I can do about the test file.
  
  Regarding colours, this was mostly done to make the highlighting look similar 
to the default output created by Asciidoctor.
  Your point about different schemes is a very valid one, though. I need to 
reconsider the style choices.
  
  Cheers

REPOSITORY
  R216 Syntax Highlighting

REVISION DETAIL
  https://phabricator.kde.org/D18475

To: andreasgr, #framework_syntax_highlighting
Cc: nibags, kwrite-devel, kde-frameworks-devel, #framework_syntax_highlighting, 
bmortimer, hase, michaelh, genethomas, ngraham, bruns, demsking, cullmann, 
vkrause, sars, dhaumann


D18475: Add AsciiDoc support

2019-01-25 Thread Nibaldo González
nibags added a comment.


  Hi!!
  Please, also add a test file in: "autotests/input/". To generate the files in 
"folding", "html" and "reference" use `make test` and 
`autotests/update-reference-data.sh`.
  
  I am not a reviewer, but I want to add some recommendations in relation to 
the itemData's:
  
  - On lines 467, 476 and 485 you use harded colors for the fonts. Ideally, 
don't use them, but use the default styles, since a better visualization is 
achieved in the different schemes: 
https://kate-editor.org/2014/03/07/kate-part-kf5-new-default-styles-for-better-color-schemes/
  - On lines 469 & 471 you use background color, and on lines 466-467, 473-474, 
479-481 and 490 you use background color, but not font color. Try not to use 
background color if it's not necessary,  to get a better visualization in the 
different schemes. However, if you need background color, it also specifies the 
font color, to avoid readability problems in some color schemes (for example, 
the background color `_bg;` with `dsNormal` is not readable in dark 
schemes).

REPOSITORY
  R216 Syntax Highlighting

REVISION DETAIL
  https://phabricator.kde.org/D18475

To: andreasgr, #framework_syntax_highlighting
Cc: nibags, kwrite-devel, kde-frameworks-devel, #framework_syntax_highlighting, 
bmortimer, hase, michaelh, genethomas, ngraham, bruns, demsking, cullmann, 
vkrause, sars, dhaumann


D18475: Add AsciiDoc support

2019-01-25 Thread Andreas Gratzer
andreasgr updated this revision to Diff 50263.
andreasgr removed projects: Frameworks, Kate.
andreasgr added a comment.
Herald added projects: Kate, Frameworks.


  - Add missing allowed leading characters for links.
  - Add escaping of attribute usage.
  - Avoid highlighting of spaces inside table.

REPOSITORY
  R216 Syntax Highlighting

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D18475?vs=50126=50263

REVISION DETAIL
  https://phabricator.kde.org/D18475

AFFECTED FILES
  data/syntax/asciidoc.xml

To: andreasgr, #framework_syntax_highlighting
Cc: kwrite-devel, kde-frameworks-devel, #framework_syntax_highlighting, 
bmortimer, hase, michaelh, genethomas, ngraham, bruns, demsking, cullmann, 
vkrause, sars, dhaumann


D18475: Add AsciiDoc support

2019-01-23 Thread Andreas Gratzer
andreasgr created this revision.
andreasgr added a reviewer: Framework: Syntax Highlighting.
andreasgr added a project: Framework: Syntax Highlighting.
Herald added projects: Kate, Frameworks.
Herald added subscribers: kde-frameworks-devel, kwrite-devel.
andreasgr requested review of this revision.

REVISION SUMMARY
  AsciiDoc syntax highlighting aiming to behave like Asciidoctor and
  use colours similar to its default style sheet.

REPOSITORY
  R216 Syntax Highlighting

REVISION DETAIL
  https://phabricator.kde.org/D18475

AFFECTED FILES
  data/syntax/asciidoc.xml

To: andreasgr, #framework_syntax_highlighting
Cc: kwrite-devel, kde-frameworks-devel, #framework_syntax_highlighting, 
bmortimer, hase, michaelh, genethomas, ngraham, bruns, demsking, cullmann, 
vkrause, sars, dhaumann