Permalink
Fetching contributors…
Cannot retrieve contributors at this time
1702 lines (1286 sloc) 71.4 KB

this is a test of this as a test of the non-wrap of the wrapping [[wiki link]] this should not be split across lines.


wrap explicit link or image elements explicit non-wrap [[wiki link]] the wrapping explicit non-wrap but the rest is fine the way to test
explicit non-wrap rest should also not ref element fine the way to test how the delay works to implement the delay alsdfj asldf jalsdf jal;sfd jasldf alsfd ja;sldkjf a;lsf dj this.

is and this test of the elimination of the delay a slj asd fl;j asdfl; jkadsfl; jkadslf fjalsdfj ladsfj fladsfj flasdf; j ala sdl jasfdl; j this is a test of how faxitalic #, Allow strong/emphasis asdkdkf asldf lasjf als fl ljl jl l dasdfsadfsaf asdf asdfslafdjaslfkjaslfj this is a test of the way reflow works with large text blocks so that the cpu is not overloaded by it works much better than having it reflow on every character typed. This is a test if the delay can be eliminated while typing and eliminating the alsdf jalsd; fjlasdj flasdfk jthis asdf asfd asdf asldfkjas dflasj dfl kjasfl; jas;lfdj a;slfdj ;alsj fdlas jfl;as fornowwe jfdlas dfj;lasfdj ;alsdfj a;lsdkfj this is a test of how much sofar asdfsfsdaf delay is this is sadfasdfsdf caused by highlighting. alsjdflja

  1. asdlfj sald;fj sdafj
  2. lasdfjlsjflsjf
  3. dkdkdkdk 4. asldfjasdflasdfjaslfdj 5. alsdfjaslf
    • lasdjf l;asjdf sadl f

l jalkjsadfl; jadslf;k jsadlf;j lkfdsj l llaskjfdl;asjfadls;kj flak;sdjfdlskjasdl;kfjl;ask fjl;sdf ;lasd l;sa dfjls;a lf;s lfsd af This is laskjdfl; adfldsakjfl;kdsfj lkdf ls al;f jl;f dsal;f dsa ;fdl;sal;fdls ;kdjlsajljasdlf;jas ;lfd j;laj asl;j al;sjf aslf jl jlasjd l;asjfd l;asfj lasdjflsajfdl ;lajf al lasdkj f;alskd fjals;df fklasl; fjlsfadj

d adsfdf lasdk asdlfj aldsfj aldsfj lfdj lafjsd f alsfd jsadlf fljlsa fl;afd jlfj lksafj lasfjd

lasdjflsajdf lskdjafl;sajfl;jf ldf;as f l;sd j;ldsaf jl;dsaf jl;safdj ls;adfj lasdfj lsafdjjdjshjsdh dfasdfadsfsdaf

lsadfj l;safj;a lfjlas;d fjals;fd lsdfj lasdfj ldfsj lsadf fjl;asfd fjl;as fjl;afsj l;afjs fl;afs fjlasf fjldf jdlsf fjlasf ldasf fjldf jladfs fjl;adfsj l;afds fj;lafs jal;sf l;sadfj f;lsadf fj;lafd fjlfsda fjldsf jsafl;d as;fl dfs ja test of the typing speed without any wrapping. The syntax highlight delay al;sdfkjasl;df jasl;fdj asdf alsdf jalsdkj f this is tyoping speed with annotator enabled instead of lexer syntax highlig al;djfal;sdf fjlasfjd lasfdj lsadf jlsadfj falsfdj alsd;f fjaldsf l asflasj flas jl asdfl this lasjdf l akjsdfl; sdfl;as jl;sdkja fjl;sad fjl;asdf fjlas;df fjl;asdf fjalsdf jl;dsfaj asd;l fjljl;sadjf lsadfj lsadfj alsd;fj las;fj lsadfj ladsf fjlsadf jsladf jsaldf fjlsadfk jsadlf; jlsadf; fjlsadf fjsadfl fjdslf; sadf;l jsadfl; jsadf l;sajdf lsadfj sldfj sal;fdjsldfjk saldfjk aslfd jsaldf jdkasfl ;dsafk jdlsf;j asl;dfjlsdaf;jasdfl; jsadl;fj asdlf;j ljl;jk ;lj l;j la jsdlj asd flj dsflsdajk flasjkd fjldsafj l ljk sdlj kdals lasdf jlas fjlasjd fla sjflaj s flasj fla js flsadf f alsfd jalsd fjl;asd fj;lasfjd fl;asf fjlsadf fj asldf jasl;df jasl;df fjasl; fjas;ldf jas;ldf fals fas lflajs df jlas dfj;las j;lsadf fj;lasdfj j fl;sadf fj;lsadf fjs;ladf fal;sfd jl;asdf fjlas;df fj las;fdj ls;adf fjlsa;f fjas;ldf fjal;sdfj lsadfkj laskfj lasdf fjlasdf fjlsa;df fjal;s ffl;jasl f;j dsal ;kj fsa alsfjasl;df fjasldf fjals;f fjals;f dfjlsafdj alsdf alsfdj lasfj la;sf jlasfdj as;lfd aslf lasdflaksdf lsd alsdfjalsdfjsalfjsalfjsa alsfj l;asjf l;saj fl;asjfl;asjf al sfdjla sfjl;asdjf ls;aj fls;aj fl;saj fl;asj fls ;afl safj sal;f jslaf lsa fals;dfjk lsad;jfsa;ldf jl;asj l;asf jl;as flasfja;sl jasl;aslf jaslfd; flas;dlf fasdf;l as;lfd fjals;dfjas ;lfljas;ldf fljkdflsfdjslfj kslfjsld fjsldf jsdf sldfkj slfjdlsfj sdlfjsdflj sflsjflsfjl sfjsldfjkls dfjlsfd jslfj lllljdksakdfs akdkdkdk alsdfkjlsdfjslfdj lasdfj ls jflasf jdlsf jslf aslf alsfd alsfdj lsf jlsf jslaf jlfjslfj slfjslfjksf slfkj slfjslf jldfjslf jslfj sldkfjlsfjslf sldfj slfj slfdj lsfdjsldf llsjfdl sf ls fjlsf jslf jslf jsldf jslf jslfsj fdlsjf lsfj lsfj kdkskd markers to be recognized when surrounded by non-white space characters bold[^f] [test][] this bold this will not reflow because it is not and now las fl asdfl;a sff;las jf;lasjf ;lsadjf ljlaslskdkdl slsldk sldkd skd how this lasfj l adjflasfj dlsafj ls;afj lasfdjla alsdfklj lasdfj aldsfj asdflasjdfl lsadjf lsadfj lsaf jls;afj as;lfjlsa flasfdj dkdksk lsdkfas;fjsl;afkjl;asjdfl;sa flsa fls;a flj fsdl; lasjdflsdfj lsdfjlsfdkjlsfdj ajls;dfj lsd;afj l;asdfj lsa;fj lsa;df dasdfsdaf dsdf sldfjsdfkjsfdlskjfd sdlflfsjflasjf s;alfj s;lfdj ;asl lsdfj ls; fd dsdskdfskfd dlasldf as alsdfj lasfj la sl sajfl safl sajf lfajf ls jfkdkdk lasfjd ;lasfj lasfk jlsa fjls fjalsfj lsfj lsaf jlsaf jlasf lsafd salfd jaslfjaslf jslfd aslfdja; lsfdj aslf jalsf jlas fjhjhjh hjhjhjhjh ljl j l;j ;ljk l;jljl;jl;jl ;lj l;j l; jljk lj l ljljljlj ljljl jl jljl j ll lj lj lj lj lj lj lj asdflkjsadfljsadf aslfjaslfj sldfjslfj alsdfjlsjf fsljflsjfslfk sfdljsldfjsflk slfdjslfd skdfj jflsfdjl ffdsljsfl s flsj fls fjlsfj lsfj lsf jslfjfjlsjfd ljf lsfkj lsfj lj khjhkhk khk hk hkhj kj hk hkh kh kh kh kjhkjhkjh k khk h asldfj asldfk asldfjk al;sdfk alsfd kjsalfdj lsaf las flasf djlaskfdj kdk dkdkd dkdkdl lasdfjla sdflkjasdf this is a test of how fast can asdfasdf asdlf ksdlf aslfd jalsdfk alsdf jalsfdjk this is a test of the way it is and should be. So we do nothing. dasdflasdfjalsfdj alsfd jlasfdj lasjkfd jl asdjflsjk adf

  1. testing this is a continuation and then some
    1. sdb item with some text and we how well the elimination of delay works will see how well it works, well it does not detect tab size. this is a test

al afl ;asdf; asfdj; asd ;asl ddda;sld ;asl d ;als df;lasf df;lasd f f;als ff;asld f ; asldf f;asl df f;sal fdfj;sald f;aslf a ;slf

Definition Term for testing wrapping words without having to la;df jl;asdfj l;asdfj l;asfjd l;asfjd l;asjf ;lasjf ddasdfdasdfas asdf asdf asf

: definition 1 jal sdfjl;as ;lsajfd is a test

: definition 2 sdldf aldsf alsfj a lfsd a ;slf asjf l;as jflasjd ;lasdfj kkkk kdas;df a;sldfj ;asldfj ;sldjf ;; las f;ljas ;fla jsf;las jdf;lasj f ;lasdf j;lsa a;sl f;asl dddfa fdas asdf fasdff asd fsadf fsaf sa;ldf

Definition terms

: Definition a;sdlf a;lsdf j;alsdf afa asdf fasd safasdfdd dd dd ff ff ff dd 1111 s 222 j ; a k d d lads f;ladfj ;lasj f;lasj f;als asdf as fasfsa as sd fsf sadf asf safd fsaf saf asfsaf sf asfhklfh slkfh lsakfh laksf hlkas fhlkas fhklas fkas f lsadf j;alsf j ;als fd;alsdfj slafj ;lasd fasldf j aslfj asf askdf alskdf alsdkf las k df asldkf asldkfj alsf aslf lsaf a l s f aslf jaslf aslf asf fj;alsdfj

: test

: test

dadsf sa fsaf sadf saf asf sadf sadf sad asfd asdf asdff

this bold this will not reflow because it is not [^f] and no how this

[^footed]: note al dsfjl;as kdfj;lasj dfl;as jdf;las jfd;l ajsfd;lj as;lfd ja;lsfdj ;lasj dfl;sa fd;lasdf jl;as fdj;lasj f

  • testing wrapping of the first paragraph to see how well it works when it overlows margins.

  • dddd asf asd asd fasd fas fasf dad a sfasd fasdf asfsaf asdff as fasdf as

test boitalicld

  1. aflas fdjl;as jf;aslf j;aslf adf dlldl ldks dksl l ;lj j lj ;l sdfsdfs dksf llll j;slafjs;alfj a;slfj ;alsfdj

    1. aflas fdjl;as > jf;aslf j;aslf adf dlldl ldks dksl l ;lj j lj ;l sdfsdfs dksf llll j;slafjs;alfj a;slfj ;alsfdj
  • test item of the alsdfj lasd jflaj sdlf jasl;df j;alsdj f;lasj fd;las jfd;lasj fd

a alsdfj alsf djla; las lasdj flasj f;lad j;lfas jf;las fj;lasj f;la sf a

alsdfj alsf djla; las lasdj flasj f;lad j;lfas jf;las fj;lasj f;la sf

kkk




Testing Testing testing testing

Test Header

  • item

header

header

  • this is a test item

head

italic bolditalic bold

Testing

  • block of text to be used for reflow tests this line has a hard break
    so this one will always start on a fresh line
    And so will this one.

  • test asldf lasfdj lasfd this is it and now this jlasfd slfd lasaldf asldf slfd salfj dlsafdjlasfd l;sfjdlsajf ddasf as fa sdasdf asdf aslfd aslf asl lsdkl sd aslf asldf alsd flasd flasfdkda sad sad fsdf aas fasfd asfd asdf as fasdf asdf asdf asdf sadf asdf asdf safasfsadf lasfdk

[^fs]: footnote wrappable text lasdf lasd jf;las fd asdlf asldf a;lsd f;als df;la sfd;la sdf;la jsdf;ljsa dkdkslsl ljsldf lskd sklsl slsl slsl s df;lj asfdl;

Headers, Header 1 Header 2 Header 3
testing 1 2 3 works much better than this is it and
testing and now this seems to be doing much better right center
dasdfsdfaf adsf sadf this is a test

idea-multimarkdown

idea-multimarkdown plugin provides Markdown language support for IntelliJ IDEA, RubyMine, PhpStorm, WebStorm, PyCharm, AppCode, Android Studio, CLion and DataGrip.

You can download it on the JetBrains plugin page.

The aim of this plugin is to be able to generate a preview that it is as close as possible to how the page will look on GitHub but do it with more IntelliJ environment intelligence to make editing and maintaining markdown documents easier. Developing with pleasure is only half the job. Real projects need to be documented. This plugin wants to extend the pleasure principle to the inevitable documentation part of the project.

GitHub may recognize variants of Markdown syntax that this plugin will not and vice versa. This is due to the parser differences and the fact that GitHub has a few syntax modifications that conflict with original Markdown spec. This plugin uses pegdown library by sirthias with a few extensions added to make the rendering of GFM more faithful.

For any communications requiring a reply please use the GitHub Issues page for this plugin. There is no ability to reply to comments left on the JetBrains plugin comment and rate page.

Wiki added with instructions on how to include your GitHub wiki in IntelliJ IDE so you can work on the wiki in the IDE and use the plugin for syntax highlighting,preview, link completions and validation. This makes adding images and manipulating the wiki a lot easier.

Two tier model of the plugin

  1. Previewing and syntax highlighting functionality is available in the Basic open source edition. Intended for mostly previewing markdown documents. Wiki link refactoring and completions are also available in the basic edition to ease the task of wiki maintenance.

  2. Advanced features used for creating and maintaining markdown documents such as split editor, refactoring, find usages, validation, auto formatting and HTML page customizations are only available in the Enhanced licensed version. 30-day free trial licenses are available from idea-multimarkdown page on my website.

Capabilities

Updating of the source

There was much code churn in the enhanced version and I have not had time to merge them into the open source version. Initially when most of the differences were limited to a few files it easy to keep them separated and sync the rest. Now, with major preferences and settings re-work, directory layout changes and new features, the differences have spread out where keeping them in sync is a major effort. I started factoring out the enhanced only changes to separate files so that future synchronization of the two branches can be less time consuming.

I am part way through the task but the formatting wound up being much more intricate than I imagined and it is not leaving me much time to make updates to latest version. I will address it as soon as I have the formatting functionality complete.

Latest Developments: Version 1.4.5

For a full list see the Version Notes

Format and Wrap on Edit

  • As you type formatting for setext header marker equalization and matching atx trailing markers
  • Smart bold/italic doubling
  • Syntax highlight for markdown hard break, two spaces before at the end of line that has a continuation.
new Enhanced Edition features
  • Editor Code Style for Markdown, for now only the format on edit options are implemented

  • Wrap on typing for text blocks, footnotes, list items, definitions with options to align continuation lines:

    • to first line's text (defaults)
    • no indent
    • indent 1 level
    • indent 2 levels
  • Format as you type for tables with options for:

    • align column widths
    • align column text to reflect column's actual alignment
    • add/remove opening and closing pipes on each row
    • add/remove padding spaces around pipes and this is a test
    • add/remove/leave left alignment column header marker

    Here is what it looks like with all options enabled:

    Table Auto Format

Latest Developments: Version 1.4.4

Bug Fix Release

  • Fix: #153, #154, #155
  • Fix: settings forms not always disposed
  • Change: References that have reference images referencing them, will have link address completion defaulting to image files

Latest Developments: Version 1.4.3

Minor Improvements & Bug Fixes

  • GitHub issue # completions added in plain text and issues/ link
  • Option to view GitHub page in preview if the document was committed and has not been modified.
  • Added more elements to code folding and added configuration for collapse by default in settings/preferences
  • Improved link completions and added changing of completion addressing format by repeated invocations of the completion action

File Move Refactoring added in 1.4.2

  • Implemented refactoring of links contained in the file being moved. Link format is preserved, wiki links will be changed to explicit links if the file is moved out of the wiki directory.
  • To Keep your links in sync use rename refactoring for:
    • link addresses
    • anchor references and header text
    • references and reference links
  • Intentions implemented to replace annotator quick fixes. Now intentions can be individually disabled and no more weak warning highlighting just to get the quick fix to show up.

Still Great GitHub Rendering Resemblance for your preview pleasure

One of the images is idea-multimarkdown preview, the other of same file on GitHub:

Screen Shot Jfx WebView

Plugins that are a great compliment to idea-multimarkdown

Pipe Table Formatter A plugin that is great for formatting markdown tables. I use to pretty up the tables in markdown and find it a great compliment to idea-multimarkdown.

.gitignore to add .gitignore file brains to the IDE and allows idea-multimarkdown to show files and links to files that will only resolve locally because they are not under git vcs.

The Background

It all started with a desire to see Markdown files in PhpStorm IDE as they would look on GitHub. I was already using nicoulaj/idea-markdown plugin but found its preview was more like Craig's List than GitHub. It did not appear to have been recently updated, so I decided to fork it and modify the style sheet it uses. How hard could that be?

I found out quickly that there was more to it than meets the eye. Rendering is done by Java not a browser, the parser is HTML 3.1 and not all features are implemented. Additionally, the Table extension did not work in the version of pegdown used by the plugin. I needed that because maintaining HTML tables is a pain. So I upgraded the plugin to use the latest pegdown, parboiled and fixed a few bugs. Since I was already in the code, I might as well add a few more desired features like user editable style sheet, fix a few more bugs, add updates to preview so that I could split the editor pane and edit in one while seeing the preview in the other.

Then I encountered some bugs in parsing of compound nested lists in pegdown and had to dive into its source to fix them. Having done that and gotten familiar with it, I decided to add a new extension. Finally, to help me with debugging and generating test expectations for pegdown, I had to have the HTML Text tab to display the generated HTML.

It has been a fun trip down the rabbit hole of IntelliJ IDEA plugin development that started with a simple desire for a Markdown preview that looked like GitHub's.

Screenshots

idea-multimarkdown-source

Split your editors and see the preview as you type

idea-multimarkdown

Peek at the HTML

idea-multimarkdown-settings

Change options, ss customize the syntax colors and CSS to your liking.

Screen Shot Settings Intentions

Screen Shot Settings Color

Screen Shot Settings Markdown

Screen Shot Settings Parser

Screen Shot Settings Css

Screen Shot Settings Html

Forking

This plugin is using a modified version of sirthias, I post my PR's but there is always a delay in both generating them and for them to be merged.

I added a few changes and extensions to the parser. For now I am using my forked copy until the official version has all the features.

The pegdown source used in this plugin can be found vsch/pegdown.


* This plugin is based on the nicoulaj/idea-markdown plugin by nicoulaj, which is based on pegdown library by sirthias.

a slj asd fl;j asdfl; jkadsfl; jkadslf fjalsdfj ladsfj fladsfj flasdf; j ala sdl jasfdl; j this is a test of how faxitalic #, Allow strong/emphasis asdkdkf asldf lasjf als fl ljl jl l dasdfsadfsaf asdf asdfslafdjaslfkjaslfj this is a test of the way reflow works with large text blocks so that the cpu is not overloaded by it works much better than having it reflow on every character typed. al;djfal;sdf fjlasfjd lasfdj lsadf jlsadfj falsfdj alsd;f fjaldsf l asflasj flas jl asdfl this lasjdf l akjsdfl; sdfl;as jl;sdkja fjl;sad fjl;asdf fjlas;df fjl;asdf fjalsdf jl;dsfaj asd;l fjljl;sadjf lsadfj lsadfj alsd;fj las;fj lsadfj ladsf fjlsadf jsladf jsaldf fjlsadfk jsadlf; jlsadf; fjlsadf fjsadfl fjdslf; sadf;l jsadfl; jsadf l;sajdf lsadfj sldfj sal;fdjsldfjk saldfjk aslfd jsaldf jdkasfl ;dsafk jdlsf;j asl;dfjlsdaf;jasdfl; jsadl;fj asdlf;j ljl;jk ;lj l;j la jsdlj asd flj dsflsdajk flasjkd fjldsafj l ljk sdlj kdals lasdf jlas fjlasjd fla sjflaj s flasj fla js flsadf f alsfd jalsd fjl;asd fj;lasfjd fl;asf fjlsadf fj asldf jasl;df jasl;df fjasl; fjas;ldf jas;ldf fals fas lflajs df jlas dfj;las j;lsadf fj;lasdfj j fl;sadf fj;lsadf fjs;ladf fal;sfd jl;asdf fjlas;df fj las;fdj ls;adf fjlsa;f fjas;ldf fjal;sdfj lsadfkj laskfj lasdf fjlasdf fjlsa;df fjal;s ffl;jasl f;j dsal ;kj fsa alsfjasl;df fjasldf fjals;f fjals;f dfjlsafdj alsdf alsfdj lasfj la;sf jlasfdj as;lfd aslf lasdflaksdf lsd alsdfjalsdfjsalfjsalfjsa alsfj l;asjf l;saj fl;asjfl;asjf al sfdjla sfjl;asdjf ls;aj fls;aj fl;saj fl;asj fls ;afl safj sal;f jslaf lsa fals;dfjk lsad;jfsa;ldf jl;asj l;asf jl;as flasfja;sl jasl;aslf jaslfd; flas;dlf fasdf;l as;lfd fjals;dfjas ;lfljas;ldf fljkdflsfdjslfj kslfjsld fjsldf jsdf sldfkj slfjdlsfj sdlfjsdflj sflsjflsfjl sfjsldfjkls dfjlsfd jslfj lllljdksakdfs akdkdkdk alsdfkjlsdfjslfdj lasdfj ls jflasf jdlsf jslf aslf alsfd alsfdj lsf jlsf jslaf jlfjslfj slfjslfjksf slfkj slfjslf jldfjslf jslfj sldkfjlsfjslf sldfj slfj slfdj lsfdjsldf llsjfdl sf ls fjlsf jslf jslf jsldf jslf jslfsj fdlsjf lsfj lsfj kdkskd markers to be recognized when surrounded by non-white space characters bold[^f] [test][] this bold this will not reflow because it is not and now las fl asdfl;a sff;las jf;lasjf ;lsadjf ljlaslskdkdl slsldk sldkd skd how this lasfj l adjflasfj dlsafj ls;afj lasfdjla alsdfklj lasdfj aldsfj asdflasjdfl lsadjf lsadfj lsaf jls;afj as;lfjlsa flasfdj dkdksk lsdkfas;fjsl;afkjl;asjdfl;sa flsa fls;a flj fsdl; lasjdflsdfj lsdfjlsfdkjlsfdj ajls;dfj lsd;afj l;asdfj lsa;fj lsa;df dasdfsdaf dsdf sldfjsdfkjsfdlskjfd sdlflfsjflasjf s;alfj s;lfdj ;asl lsdfj ls; fd dsdskdfskfd dlasldf as alsdfj lasfj la sl sajfl safl sajf lfajf ls jfkdkdk lasfjd ;lasfj lasfk jlsa fjls fjalsfj lsfj lsaf jlsaf jlasf lsafd salfd jaslfjaslf jslfd aslfdja; lsfdj aslf jalsf jlas fjhjhjh hjhjhjhjh ljl j l;j ;ljk l;jljl;jl;jl ;lj l;j l; jljk lj l ljljljlj ljljl jl jljl j ll lj lj lj lj lj lj lj asdflkjsadfljsadf aslfjaslfj sldfjslfj alsdfjlsjf fsljflsjfslfk sfdljsldfjsflk slfdjslfd skdfj jflsfdjl ffdsljsfl s flsj fls fjlsfj lsfj lsf jslfjfjlsjfd ljf lsfkj lsfj lj khjhkhk khk hk hkhj kj hk hkh kh kh kh kjhkjhkjh k khk h

  1. testing this is a continuation and then some
    1. sub item with some text and we will see how well it works, well it does not detect tab size.

al afl ;asdf; asfdj; asd ;asl a;sld ;asl d ;als df;lasf df;lasd f f;als ff;asld f ; asldf f;asl df f;sal fdfj;sald f;aslf a ;slf

Definition Term for testing wrapping words without having to la;df jl;asdfj l;asdfj l;asfjd l;asfjd l;asjf ;lasjf ddasdfdasdfas asdf asdf asf

: definition 1 jal sdfjl;as ;lsajfd is a test

: definition 2 sdldf aldsf alsfj a lfsd a ;slf asjf l;as jflasjd ;lasdfj kkkk kdas;df a;sldfj ;asldfj ;sldjf ;; las f;ljas ;fla jsf;las jdf;lasj f ;lasdf j;lsa a;sl f;asl dddfa fdas asdf
fasdff asd fsadf fsaf sa;ldf

Definition term : Definition a;sdlf a;lsdf j;alsdf afa asdf fasd safasdfdd dd dd ff ff ff dd 1111 s 222 j ; a k d d lads f;ladfj ;lasj f;lasj f;als asdf as fasfsa as sd fsf sadf asf safd fsaf saf asfsaf sf asfhklfh slkfh lsakfh laksf hlkas fhlkas fhklas fkas f
lsadf j;alsf j ;als fd;alsdfj slafj ;lasd fasldf j aslfj asf askdf alskdf alsdkf las k df asldkf asldkfj alsf aslf lsaf a l s f aslf jaslf aslf asf fj;alsdfj

: test

: test

dadsf sa fsaf sadf saf asf sadf sadf sad asfd asdf asdff

this bold this will not reflow because it is not [^f] and no how this

[^foots]: note al dsfjl;as kdfj;lasj dfl;as jdf;las jfd;l ajsfd;lj as;lfd ja;lsfdj ;lasj dfl;sa fd;lasdf jl;as fdj;lasj f

  • testing wrapping of the first paragraph to see how well it works when it overlows margins.

  • dddd asf asd asd fasd fas fasf dad a sfasd fasdf asfsaf asdff as fasdf as

test boitalicld

  1. aflas fdjl;as jf;aslf j;aslf adf dlldl ldks dksl l ;lj j lj ;l sdfsdfs dksf llll j;slafjs;alfj a;slfj ;alsfdj

    1. aflas fdjl;as > jf;aslf j;aslf adf dlldl ldks dksl l ;lj j lj ;l sdfsdfs dksf llll j;slafjs;alfj a;slfj ;alsfdj
  • test item of the alsdfj lasd jflaj sdlf jasl;df j;alsdj f;lasj fd;las jfd;lasj fd

a alsdfj alsf djla; las lasdj flasj f;lad j;lfas jf;las fj;lasj f;la sf a

alsdfj alsf djla; las lasdj flasj f;lad j;lfas jf;las fj;lasj f;la sf

kkk




Testing testing testing

Test Header

  • item

header

header

  • item

head

italic bolditalic bold

Testing

  • block of text to be used for reflow tests this line has a hard break
    so this one will always start on a fresh line
    And so will this one.

  • test asldf lasfdj lasfd this is it and now this jlasfd slfd lasaldf asldf slfd salfj dlsafdjlasfd l;sfjdlsajf ddasf as fa sdasdf asdf aslfd aslf asl lsdkl sd aslf asldf alsd flasd flasfdkda sad sad fsdf aas fasfd asfd asdf as fasdf asdf asdf asdf sadf asdf asdf safasfsadf lasfdk

[^fd]: footnote wrappable text lasdf lasd jf;las fd asdlf asldf a;lsd f;als df;la sfd;la sdf;la jsdf;ljsa dkdkslsl ljsldf lskd sklsl slsl slsl s df;lj asfdl;

Headers, Header 1 Header 2 Header 3
testing 1 2 3 works much better than this is it and
testing and now this seems to be doing much better right center
dasdfsdfaf adsf sadf this is a test

idea-multimarkdown

idea-multimarkdown plugin provides Markdown language support for IntelliJ IDEA, RubyMine, PhpStorm, WebStorm, PyCharm, AppCode, Android Studio, CLion and DataGrip.

You can download it on the JetBrains plugin page.

The aim of this plugin is to be able to generate a preview that it is as close as possible to how the page will look on GitHub but do it with more IntelliJ environment intelligence to make editing and maintaining markdown documents easier. Developing with pleasure is only half the job. Real projects need to be documented. This plugin wants to extend the pleasure principle to the inevitable documentation part of the project.

GitHub may recognize variants of Markdown syntax that this plugin will not and vice versa. This is due to the parser differences and the fact that GitHub has a few syntax modifications that conflict with original Markdown spec. This plugin uses pegdown library by sirthias with a few extensions added to make the rendering of GFM more faithful.

For any communications requiring a reply please use the
GitHub Issues page for this plugin. There is no ability to reply to comments left on the JetBrains plugin comment and rate page.

Wiki added with instructions on how to include your GitHub wiki in IntelliJ IDE so you can work on the wiki in the IDE and use the plugin for syntax highlighting,preview, link completions and validation. This makes adding images and manipulating the wiki a lot easier.

Two tier model of the plugin

  1. Previewing and syntax highlighting functionality is available in the Basic open source edition. Intended for mostly previewing markdown documents. Wiki link refactoring and completions are also available in the basic edition to ease the task of wiki maintenance.

  2. Advanced features used for creating and maintaining markdown documents such as split editor, refactoring, find usages, validation, auto formatting and HTML page customizations are only available in the Enhanced licensed version. 30-day free trial licenses are available from idea-multimarkdown page on my website.

Capabilities

Updating of the source

There was much code churn in the enhanced version and I have not had time to merge them into the open source version. Initially when most of the differences were limited to a few files it easy to keep them separated and sync the rest. Now, with major preferences and settings re-work, directory layout changes and new features, the differences have spread out where keeping them in sync is a major effort. I started factoring out the enhanced only changes to separate files so that future synchronization of the two branches can be less time consuming.

I am part way through the task but the formatting wound up being much more intricate than I imagined and it is not leaving me much time to make updates to latest version. I will address it as soon as I have the formatting functionality complete.

Latest Developments: Version 1.4.5

For a full list see the Version Notes

Format and Wrap on Edit

  • As you type formatting for setext header marker equalization and matching atx trailing markers
  • Smart bold/italic doubling
  • Syntax highlight for markdown hard break, two spaces before at the end of line that has a continuation.
new Enhanced Edition features
  • Editor Code Style for Markdown, for now only the format on edit options are implemented

  • Wrap on typing for text blocks, footnotes, list items, definitions with options to align continuation lines:

    • to first line's text (default)
    • no indent
    • indent 1 level
    • indent 2 levels
  • Format as you type for tables with options for:

    • align column widths
    • align column text to reflect column's actual alignment
    • add/remove opening and closing pipes on each row
    • add/remove padding spaces around pipes
    • add/remove/leave left alignment column header marker

    Here is what it looks like with all options enabled:

    Table Auto Format

Latest Developments: Version 1.4.4

Bug Fix Release

  • Fix: #153, #154, #155
  • Fix: settings forms not always disposed
  • Change: References that have reference images referencing them, will have link address completion defaulting to image files

Latest Developments: Version 1.4.3

Minor Improvements & Bug Fixes

  • GitHub issue # completions added in plain text and issues/ link
  • Option to view GitHub page in preview if the document was committed and has not been modified.
  • Added more elements to code folding and added configuration for collapse by default in settings/preferences
  • Improved link completions and added changing of completion addressing format by repeated invocations of the completion action

File Move Refactoring added in 1.4.2

  • Implemented refactoring of links contained in the file being moved. Link format is preserved, wiki links will be changed to explicit links if the file is moved out of the wiki directory.
  • To Keep your links in sync use rename refactoring for:
    • link addresses
    • anchor references and header text
    • references and reference links
  • Intentions implemented to replace annotator quick fixes. Now intentions can be individually disabled and no more weak warning highlighting just to get the quick fix to show up.

Still Great GitHub Rendering Resemblance for your preview pleasure

One of the images is idea-multimarkdown preview, the other of same file on GitHub:

Screen Shot Jfx WebView

Plugins that are a great compliment to idea-multimarkdown

Pipe Table Formatter A plugin that is great for formatting markdown tables. I use to pretty up the tables in markdown and find it a great compliment to idea-multimarkdown.

.gitignore to add .gitignore file brains to the IDE and allows idea-multimarkdown to show files and links to files that will only resolve locally because they are not under git vcs.

The Background

It all started with a desire to see Markdown files in PhpStorm IDE as they would look on GitHub. I was already using
nicoulaj/idea-markdown plugin but found its preview was more like
Craig's List than GitHub. It did not appear to have been recently updated, so I decided to fork it and modify the style sheet it uses. How hard could that be?

I found out quickly that there was more to it than meets the eye. Rendering is done by Java not a browser, the parser is HTML 3.1 and not all features are implemented. Additionally, the Table extension did not work in the version of pegdown used by the plugin. I needed that because maintaining HTML tables is a pain. So I upgraded the plugin to use the latest pegdown, parboiled and fixed a few bugs. Since I was already in the code, I might as well add a few more desired features like user editable style sheet, fix a few more bugs, add updates to preview so that I could split the editor pane and edit in one while seeing the preview in the other.

Then I encountered some bugs in parsing of compound nested lists in pegdown and had to dive into its source to fix them. Having done that and gotten familiar with it, I decided to add a new extension. Finally, to help me with debugging and generating test expectations for pegdown, I had to have the HTML Text tab to display the generated HTML.

It has been a fun trip down the rabbit hole of IntelliJ IDEA plugin development that started with a simple desire for a Markdown preview that looked like GitHub's.

Screenshots

idea-multimarkdown-source

Split your editor and see the preview as you type

idea-multimarkdown

Peek at the HTML

idea-multimarkdown-settings

Change options, customize the syntax colors and CSS to your liking.

Screen Shot Settings Intentions

Screen Shot Settings Color

Screen Shot Settings Markdown

Screen Shot Settings Parser

Screen Shot Settings Css

Screen Shot Settings Html

Forking

This plugin is using a modified version of sirthias, I post my PR's but there is always a delay in both generating them and for them to be merged.

I added a few changes and extensions to the parser. For now I am using my forked copy until the official version has all the features.

The pegdown source used in this plugin can be found vsch/pegdown.


* This plugin is based on the nicoulaj/idea-markdown plugin by nicoulaj, which is based on pegdown library by sirthias.

a slj asd fl;j asdfl; jkadsfl; jkadslf fjalsdfj ladsfj fladsfj flasdf; j ala sdl jasfdl; j this is a test of how faxitalic #, Allow strong/emphasis asdkdkf asldf lasjf als fl ljl jl l dasdfsadfsaf asdf asdfslafdjaslfkjaslfj this is a test of the way reflow works with large text blocks so that the cpu is not overloaded by it works much better than having it reflow on every character typed. al;djfal;sdf fjlasfjd lasfdj lsadf jlsadfj falsfdj alsd;f fjaldsf l asflasj flas jl asdfl this lasjdf l akjsdfl; sdfl;as jl;sdkja fjl;sad fjl;asdf fjlas;df fjl;asdf fjalsdf jl;dsfaj asd;l fjljl;sadjf lsadfj lsadfj alsd;fj las;fj lsadfj ladsf fjlsadf jsladf jsaldf fjlsadfk jsadlf; jlsadf; fjlsadf fjsadfl fjdslf; sadf;l jsadfl; jsadf l;sajdf lsadfj sldfj sal;fdjsldfjk saldfjk aslfd jsaldf jdkasfl ;dsafk jdlsf;j asl;dfjlsdaf;jasdfl; jsadl;fj asdlf;j ljl;jk ;lj l;j la jsdlj asd flj dsflsdajk flasjkd fjldsafj l ljk sdlj kdals lasdf jlas fjlasjd fla sjflaj s flasj fla js flsadf f alsfd jalsd fjl;asd fj;lasfjd fl;asf fjlsadf fj asldf jasl;df jasl;df fjasl; fjas;ldf jas;ldf fals fas lflajs df jlas dfj;las j;lsadf fj;lasdfj j fl;sadf fj;lsadf fjs;ladf fal;sfd jl;asdf fjlas;df fj las;fdj ls;adf fjlsa;f fjas;ldf fjal;sdfj lsadfkj laskfj lasdf fjlasdf fjlsa;df fjal;s ffl;jasl f;j dsal ;kj fsa alsfjasl;df fjasldf fjals;f fjals;f dfjlsafdj alsdf alsfdj lasfj la;sf jlasfdj as;lfd aslf lasdflaksdf lsd alsdfjalsdfjsalfjsalfjsa alsfj l;asjf l;saj fl;asjfl;asjf al sfdjla sfjl;asdjf ls;aj fls;aj fl;saj fl;asj fls ;afl safj sal;f jslaf lsa fals;dfjk lsad;jfsa;ldf jl;asj l;asf jl;as flasfja;sl jasl;aslf jaslfd; flas;dlf fasdf;l as;lfd fjals;dfjas ;lfljas;ldf fljkdflsfdjslfj kslfjsld fjsldf jsdf sldfkj slfjdlsfj sdlfjsdflj sflsjflsfjl sfjsldfjkls dfjlsfd jslfj lllljdksakdfs akdkdkdk alsdfkjlsdfjslfdj lasdfj ls jflasf jdlsf jslf aslf alsfd alsfdj lsf jlsf jslaf jlfjslfj slfjslfjksf slfkj slfjslf jldfjslf jslfj sldkfjlsfjslf sldfj slfj slfdj lsfdjsldf llsjfdl sf ls fjlsf jslf jslf jsldf jslf jslfsj fdlsjf lsfj lsfj kdkskd markers to be recognized when surrounded by non-white space characters bold[^f] [test][] this bold this will not reflow because it is not and now las fl asdfl;a sff;las jf;lasjf ;lsadjf ljlaslskdkdl slsldk sldkd skd how this lasfj l adjflasfj dlsafj ls;afj lasfdjla alsdfklj lasdfj aldsfj asdflasjdfl lsadjf lsadfj lsaf jls;afj as;lfjlsa flasfdj dkdksk lsdkfas;fjsl;afkjl;asjdfl;sa flsa fls;a flj fsdl; lasjdflsdfj lsdfjlsfdkjlsfdj ajls;dfj lsd;afj l;asdfj lsa;fj lsa;df dasdfsdaf dsdf sldfjsdfkjsfdlskjfd sdlflfsjflasjf s;alfj s;lfdj ;asl lsdfj ls; fd dsdskdfskfd dlasldf as alsdfj lasfj la sl sajfl safl sajf lfajf ls jfkdkdk lasfjd ;lasfj lasfk jlsa fjls fjalsfj lsfj lsaf jlsaf jlasf lsafd salfd jaslfjaslf jslfd aslfdja; lsfdj aslf jalsf jlas fjhjhjh hjhjhjhjh ljl j l;j ;ljk l;jljl;jl;jl ;lj l;j l; jljk lj l ljljljlj ljljl jl jljl j ll lj lj lj lj lj lj lj asdflkjsadfljsadf aslfjaslfj sldfjslfj alsdfjlsjf fsljflsjfslfk sfdljsldfjsflk slfdjslfd skdfj jflsfdjl ffdsljsfl s flsj fls fjlsfj lsfj lsf jslfjfjlsjfd ljf lsfkj lsfj lj khjhkhk khk hk hkhj kj hk hkh kh kh kh kjhkjhkjh k khk h

  1. testing this is a continuation and then some
    1. sub item with some text and we will see how well it works, well it does not detect tab size.

al afl ;asdf; asfdj; asd ;asl a;sld ;asl d ;als df;lasf df;lasd f f;als ff;asld f ; asldf f;asl df f;sal fdfj;sald f;aslf a ;slf

Definition Term for testing wrapping words without having to la;df jl;asdfj l;asdfj l;asfjd l;asfjd l;asjf ;lasjf ddasdfdasdfas asdf asdf asf

: definition 1 jal sdfjl;as ;lsajfd is a test

: definition 2 sdldf aldsf alsfj a lfsd a ;slf asjf l;as jflasjd ;lasdfj kkkk kdas;df a;sldfj ;asldfj ;sldjf ;; las f;ljas ;fla jsf;las jdf;lasj f ;lasdf j;lsa a;sl f;asl dddfa fdas asdf
fasdff asd fsadf fsaf sa;ldf

Definition term : Definition a;sdlf a;lsdf j;alsdf afa asdf fasd safasdfdd dd dd ff ff ff dd 1111 s 222 j ; a k d d lads
f;ladfj ;lasj f;lasj f;als asdf as fasfsa as sd fsf sadf asf safd fsaf saf asfsaf sf asfhklfh slkfh lsakfh laksf hlkas fhlkas fhklas fkas f
lsadf j;alsf j ;als fd;alsdfj slafj ;lasd fasldf j aslfj asf askdf alskdf alsdkf las k df asldkf asldkfj alsf aslf lsaf a l s f aslf jaslf aslf asf fj;alsdfj

: test

: test

dadsf sa fsaf sadf saf asf sadf sadf sad asfd asdf asdff

this bold this will not reflow because it is not [^f] and no how this

[^footd]: note al dsfjl;as kdfj;lasj dfl;as jdf;las jfd;l ajsfd;lj as;lfd ja;lsfdj ;lasj dfl;sa fd;lasdf jl;as fdj;lasj f

  • testing wrapping of the first paragraph to see how well it works when it overlows margins.

  • dddd asf asd asd fasd fas fasf dad a sfasd fasdf asfsaf asdff as fasdf as

test boitalicld

  1. aflas fdjl;as jf;aslf j;aslf adf dlldl ldks dksl l ;lj j lj ;l sdfsdfs dksf llll j;slafjs;alfj a;slfj ;alsfdj

    1. aflas fdjl;as > jf;aslf j;aslf adf dlldl ldks dksl l ;lj j lj ;l sdfsdfs dksf llll j;slafjs;alfj a;slfj ;alsfdj
  • test item of the alsdfj lasd jflaj sdlf jasl;df j;alsdj f;lasj fd;las jfd;lasj fd

a alsdfj alsf djla; las lasdj flasj f;lad j;lfas jf;las fj;lasj f;la sf a

alsdfj alsf djla; las lasdj flasj f;lad j;lfas jf;las fj;lasj f;la sf

kkk




Testing testing testing

Test Header

  • item

header

header

  • item

head

italic bolditalic bold

Testing

  • block of text to be used for reflow tests this line has a hard break
    so this one will always start on a fresh line
    And so will this one.

  • test asldf lasfdj lasfd this is it and now this jlasfd slfd lasaldf asldf slfd salfj dlsafdjlasfd l;sfjdlsajf ddasf as fa sdasdf asdf aslfd aslf asl lsdkl sd aslf asldf alsd flasd flasfdkda sad sad fsdf aas fasfd asfd asdf as fasdf asdf asdf asdf sadf asdf asdf safasfsadf lasfdk

[^f]: footnote wrappable text lasdf lasd jf;las fd asdlf asldf a;lsd f;als df;la sfd;la sdf;la jsdf;ljsa dkdkslsl ljsldf lskd sklsl slsl slsl s df;lj asfdl;

Headers, Header 1 Header 2 Header 3
testing 1 2 3 works much better than this is it and
testing and now this seems to be doing much better right center
dasdfsdfaf adsf sadf this is a test

idea-multimarkdown

idea-multimarkdown plugin provides Markdown language support for IntelliJ IDEA, RubyMine, PhpStorm, WebStorm, PyCharm, AppCode, Android Studio, CLion and DataGrip.

You can download it on the JetBrains plugin page.

The aim of this plugin is to be able to generate a preview that it is as close as possible to how the page will look on GitHub but do it with more IntelliJ environment intelligence to make editing and maintaining markdown documents easier. Developing with pleasure is only half the job. Real projects need to be documented. This plugin wants to extend the pleasure principle to the inevitable documentation part of the project.

GitHub may recognize variants of Markdown syntax that this plugin will not and vice versa. This is due to the parser differences and the fact that GitHub has a few syntax modifications that conflict with original Markdown spec. This plugin uses pegdown library by sirthias with a few extensions added to make the rendering of GFM more faithful.

For any communications requiring a reply please use the
GitHub Issues page for this plugin. There is no ability to reply to comments left on the JetBrains plugin comment and rate page.

Wiki added with instructions on how to include your GitHub wiki in IntelliJ IDE so you can work on the wiki in the IDE and use the plugin for syntax highlighting,preview, link completions and validation. This makes adding images and manipulating the wiki a lot easier.

Two tier model of the plugin

  1. Previewing and syntax highlighting functionality is available in the Basic open source edition. Intended for mostly previewing markdown documents. Wiki link refactoring and completions are also available in the basic edition to ease the task of wiki maintenance.

  2. Advanced features used for creating and maintaining markdown documents such as split editor, refactoring, find usages, validation, auto formatting and HTML page customizations are only available in the Enhanced licensed version. 30-day free trial licenses are available from idea-multimarkdown page on my website.

Capabilities

Updating of the source

There was much code churn in the enhanced version and I have not had time to merge them into the open source version. Initially when most of the differences were limited to a few files it easy to keep them separated and sync the rest. Now, with major preferences and settings re-work, directory layout changes and new features, the differences have spread out where keeping them in sync is a major effort. I started factoring out the enhanced only changes to separate files so that future synchronization of the two branches can be less time consuming.

I am part way through the task but the formatting wound up being much more intricate than I imagined and it is not leaving me much time to make updates to latest version. I will address it as soon as I have the formatting functionality complete.

Latest Developments: Version 1.4.5

For a full list see the Version Notes

Format and Wrap on Edit

  • As you type formatting for setext header marker equalization and matching atx trailing markers
  • Smart bold/italic doubling
  • Syntax highlight for markdown hard break, two spaces before at the end of line that has a continuation.
new Enhanced Edition features
  • Editor Code Style for Markdown, for now only the format on edit options are implemented

  • Wrap on typing for text blocks, footnotes, list items, definitions with options to align continuation lines:

    • to first line's text (default)
    • no indent
    • indent 1 level
    • indent 2 levels
  • Format as you type for tables with options for:

    • align column widths
    • align column text to reflect column's actual alignment
    • add/remove opening and closing pipes on each row
    • add/remove padding spaces around pipes
    • add/remove/leave left alignment column header marker

    Here is what it looks like with all options enabled:

    Table Auto Format

Latest Developments: Version 1.4.4

Bug Fix Release

  • Fix: #153, #154, #155
  • Fix: settings forms not always disposed
  • Change: References that have reference images referencing them, will have link address completion defaulting to image files

Latest Developments: Version 1.4.3

Minor Improvements & Bug Fixes

  • GitHub issue # completions added in plain text and issues/ link
  • Option to view GitHub page in preview if the document was committed and has not been modified.
  • Added more elements to code folding and added configuration for collapse by default in settings/preferences
  • Improved link completions and added changing of completion addressing format by repeated invocations of the completion action

File Move Refactoring added in 1.4.2

  • Implemented refactoring of links contained in the file being moved. Link format is preserved, wiki links will be changed to explicit links if the file is moved out of the wiki directory.
  • To Keep your links in sync use rename refactoring for:
    • link addresses
    • anchor references and header text
    • references and reference links
  • Intentions implemented to replace annotator quick fixes. Now intentions can be individually disabled and no more weak warning highlighting just to get the quick fix to show up.

Still Great GitHub Rendering Resemblance for your preview pleasure

One of the images is idea-multimarkdown preview, the other of same file on GitHub:

Screen Shot Jfx WebView

Plugins that are a great compliment to idea-multimarkdown

Pipe Table Formatter A plugin that is great for formatting markdown tables. I use to pretty up the tables in markdown and find it a great compliment to idea-multimarkdown.

.gitignore to add .gitignore file brains to the IDE and allows idea-multimarkdown to show files and links to files that will only resolve locally because they are not under git vcs.

The Background

It all started with a desire to see Markdown files in PhpStorm IDE as they would look on GitHub. I was already using
nicoulaj/idea-markdown plugin but found its preview was more like
Craig's List than GitHub. It did not appear to have been recently updated, so I decided to fork it and modify the style sheet it uses. How hard could that be?

I found out quickly that there was more to it than meets the eye. Rendering is done by Java not a browser, the parser is HTML 3.1 and not all features are implemented. Additionally, the Table extension did not work in the version of pegdown used by the plugin. I needed that because maintaining HTML tables is a pain. So I upgraded the plugin to use the latest pegdown, parboiled and fixed a few bugs. Since I was already in the code, I might as well add a few more desired features like user editable style sheet, fix a few more bugs, add updates to preview so that I could split the editor pane and edit in one while seeing the preview in the other.

Then I encountered some bugs in parsing of compound nested lists in pegdown and had to dive into its source to fix them. Having done that and gotten familiar with it, I decided to add a new extension. Finally, to help me with debugging and generating test expectations for pegdown, I had to have the HTML Text tab to display the generated HTML.

It has been a fun trip down the rabbit hole of IntelliJ IDEA plugin development that started with a simple desire for a Markdown preview that looked like GitHub's.

Screenshots

idea-multimarkdown-source

Split your editor and see the preview as you type

idea-multimarkdown

Peek at the HTML

idea-multimarkdown-settings

Change options, customize the syntax colors and CSS to your liking.

Screen Shot Settings Intentions

Screen Shot Settings Color

Screen Shot Settings Markdown

Screen Shot Settings Parser

Screen Shot Settings Css

Screen Shot Settings Html

Forking

This plugin is using a modified version of sirthias, I post my PR's but there is always a delay in both generating them and for them to be merged.

I added a few changes and extensions to the parser. For now I am using my forked copy until the official version has all the features.

The pegdown source used in this plugin can be found vsch/pegdown.


* This plugin is based on the nicoulaj/idea-markdown plugin by nicoulaj, which is based on pegdown library by sirthias.

a slj asd fl;j asdfl; jkadsfl; jkadslf fjalsdfj ladsfj fladsfj flasdf; j ala sdl jasfdl; j this is a test of how faxitalic #, Allow strong/emphasis asdkdkf asldf lasjf als fl ljl jl l dasdfsadfsaf asdf asdfslafdjaslfkjaslfj this is a test of the way reflow works with large text blocks so that the cpu is not overloaded by it works much better than having it reflow on every character typed. al;djfal;sdf fjlasfjd lasfdj lsadf jlsadfj falsfdj alsd;f fjaldsf l asflasj flas jl asdfl this lasjdf l akjsdfl; sdfl;as jl;sdkja fjl;sad fjl;asdf fjlas;df fjl;asdf fjalsdf jl;dsfaj asd;l fjljl;sadjf lsadfj lsadfj alsd;fj las;fj lsadfj ladsf fjlsadf jsladf jsaldf fjlsadfk jsadlf; jlsadf; fjlsadf fjsadfl fjdslf; sadf;l jsadfl; jsadf l;sajdf lsadfj sldfj sal;fdjsldfjk saldfjk aslfd jsaldf jdkasfl ;dsafk jdlsf;j asl;dfjlsdaf;jasdfl; jsadl;fj asdlf;j ljl;jk ;lj l;j la jsdlj asd flj dsflsdajk flasjkd fjldsafj l ljk sdlj kdals lasdf jlas fjlasjd fla sjflaj s flasj fla js flsadf f alsfd jalsd fjl;asd fj;lasfjd fl;asf fjlsadf fj asldf jasl;df jasl;df fjasl; fjas;ldf jas;ldf fals fas lflajs df jlas dfj;las j;lsadf fj;lasdfj j fl;sadf fj;lsadf fjs;ladf fal;sfd jl;asdf fjlas;df fj las;fdj ls;adf fjlsa;f fjas;ldf fjal;sdfj lsadfkj laskfj lasdf fjlasdf fjlsa;df fjal;s ffl;jasl f;j dsal ;kj fsa alsfjasl;df fjasldf fjals;f fjals;f dfjlsafdj alsdf alsfdj lasfj la;sf jlasfdj as;lfd aslf lasdflaksdf lsd alsdfjalsdfjsalfjsalfjsa alsfj l;asjf l;saj fl;asjfl;asjf al sfdjla sfjl;asdjf ls;aj fls;aj fl;saj fl;asj fls ;afl safj sal;f jslaf lsa fals;dfjk lsad;jfsa;ldf jl;asj l;asf jl;as flasfja;sl jasl;aslf jaslfd; flas;dlf fasdf;l as;lfd fjals;dfjas ;lfljas;ldf fljkdflsfdjslfj kslfjsld fjsldf jsdf sldfkj slfjdlsfj sdlfjsdflj sflsjflsfjl sfjsldfjkls dfjlsfd jslfj lllljdksakdfs akdkdkdk alsdfkjlsdfjslfdj lasdfj ls jflasf jdlsf jslf aslf alsfd alsfdj lsf jlsf jslaf jlfjslfj slfjslfjksf slfkj slfjslf jldfjslf jslfj sldkfjlsfjslf sldfj slfj slfdj lsfdjsldf llsjfdl sf ls fjlsf jslf jslf jsldf jslf jslfsj fdlsjf lsfj lsfj kdkskd markers to be recognized when surrounded by non-white space characters bold[^f] [test][] this bold this will not reflow because it is not and now las fl asdfl;a sff;las jf;lasjf ;lsadjf ljlaslskdkdl slsldk sldkd skd how this lasfj l adjflasfj dlsafj ls;afj lasfdjla alsdfklj lasdfj aldsfj asdflasjdfl lsadjf lsadfj lsaf jls;afj as;lfjlsa flasfdj dkdksk lsdkfas;fjsl;afkjl;asjdfl;sa flsa fls;a flj fsdl; lasjdflsdfj lsdfjlsfdkjlsfdj ajls;dfj lsd;afj l;asdfj lsa;fj lsa;df dasdfsdaf dsdf sldfjsdfkjsfdlskjfd sdlflfsjflasjf s;alfj s;lfdj ;asl lsdfj ls; fd dsdskdfskfd dlasldf as alsdfj lasfj la sl sajfl safl sajf lfajf ls jfkdkdk lasfjd ;lasfj lasfk jlsa fjls fjalsfj lsfj lsaf jlsaf jlasf lsafd salfd jaslfjaslf jslfd aslfdja; lsfdj aslf jalsf jlas fjhjhjh hjhjhjhjh ljl j l;j ;ljk l;jljl;jl;jl ;lj l;j l; jljk lj l ljljljlj ljljl jl jljl j ll lj lj lj lj lj lj lj asdflkjsadfljsadf aslfjaslfj sldfjslfj alsdfjlsjf fsljflsjfslfk sfdljsldfjsflk slfdjslfd skdfj jflsfdjl ffdsljsfl s flsj fls fjlsfj lsfj lsf jslfjfjlsjfd ljf lsfkj lsfj lj khjhkhk khk hk hkhj kj hk hkh kh kh kh kjhkjhkjh k khk h

  1. testing this is a continuation and then some
    1. sub item with some text and we will see how well it works, well it does not detect tab size.

al afl ;asdf; asfdj; asd ;asl a;sld ;asl d ;als df;lasf df;lasd f f;als ff;asld f ; asldf f;asl df f;sal fdfj;sald f;aslf a ;slf

Definition Term for testing wrapping words without having to la;df jl;asdfj l;asdfj l;asfjd l;asfjd l;asjf ;lasjf ddasdfdasdfas asdf asdf asf

: definition 1 jal sdfjl;as ;lsajfd is a test

: definition 2 sdldf aldsf alsfj a lfsd a ;slf asjf l;as jflasjd ;lasdfj kkkk kdas;df a;sldfj ;asldfj ;sldjf ;; las f;ljas ;fla jsf;las jdf;lasj f ;lasdf j;lsa a;sl f;asl dddfa fdas asdf
fasdff asd fsadf fsaf sa;ldf

Definition term : Definition a;sdlf a;lsdf j;alsdf afa asdf fasd safasdfdd dd dd ff ff ff dd 1111 s 222 j ; a k d d lads
f;ladfj ;lasj f;lasj f;als asdf as fasfsa as sd fsf sadf asf safd fsaf saf asfsaf sf asfhklfh slkfh lsakfh laksf hlkas fhlkas fhklas fkas f
lsadf j;alsf j ;als fd;alsdfj slafj ;lasd fasldf j aslfj asf askdf alskdf alsdkf las k df asldkf asldkfj alsf aslf lsaf a l s f aslf jaslf aslf asf fj;alsdfj

: test

: test

dadsf sa fsaf sadf saf asf sadf sadf sad asfd asdf asdff

this bold this will not reflow because it is not [^f] and no how this

[^foot]: note al dsfjl;as kdfj;lasj dfl;as jdf;las jfd;l ajsfd;lj as;lfd ja;lsfdj ;lasj dfl;sa fd;lasdf jl;as fdj;lasj f

  • testing wrapping of the first paragraph to see how well it works when it overlows margins.

  • dddd asf asd asd fasd fas fasf dad a sfasd fasdf asfsaf asdff as fasdf as

test boitalicld

  1. aflas fdjl;as jf;aslf j;aslf adf dlldl ldks dksl l ;lj j lj ;l sdfsdfs dksf llll j;slafjs;alfj a;slfj ;alsfdj

    1. aflas fdjl;as > jf;aslf j;aslf adf dlldl ldks dksl l ;lj j lj ;l sdfsdfs dksf llll j;slafjs;alfj a;slfj ;alsfdj
  • test item of the alsdfj lasd jflaj sdlf jasl;df j;alsdj f;lasj fd;las jfd;lasj fd

a alsdfj alsf djla; las lasdj flasj f;lad j;lfas jf;las fj;lasj f;la sf a

alsdfj alsf djla; las lasdj flasj f;lad j;lfas jf;las fj;lasj f;la sf

kkk




Testing testing testing

Test Header

  • item

header

header

  • item

head

italic bolditalic bold

Testing

  • block of text to be used for reflow tests this line has a hard break
    so this one will always start on a fresh line
    And so will this one.

  • test asldf lasfdj lasfd this is it and now this jlasfd slfd lasaldf asldf slfd salfj dlsafdjlasfd l;sfjdlsajf ddasf as fa sdasdf asdf aslfd aslf asl lsdkl sd aslf asldf alsd flasd flasfdkda sad sad fsdf aas fasfd asfd asdf as fasdf asdf asdf asdf sadf asdf asdf safasfsadf lasfdk

[^f]: footnote wrappable text lasdf lasd jf;las fd asdlf asldf a;lsd f;als df;la sfd;la sdf;la jsdf;ljsa dkdkslsl ljsldf lskd sklsl slsl slsl s df;lj asfdl;

Headers, Header 1 Header 2 Header 3
testing 1 2 3 works much better than this is it and
testing and now this seems to be doing much better right center
dasdfsdfaf adsf sadf this is a test

idea-multimarkdown

idea-multimarkdown plugin provides Markdown language support for IntelliJ IDEA, RubyMine, PhpStorm, WebStorm, PyCharm, AppCode, Android Studio, CLion and DataGrip.

You can download it on the JetBrains plugin page.

The aim of this plugin is to be able to generate a preview that it is as close as possible to how the page will look on GitHub but do it with more IntelliJ environment intelligence to make editing and maintaining markdown documents easier. Developing with pleasure is only half the job. Real projects need to be documented. This plugin wants to extend the pleasure principle to the inevitable documentation part of the project.

GitHub may recognize variants of Markdown syntax that this plugin will not and vice versa. This is due to the parser differences and the fact that GitHub has a few syntax modifications that conflict with original Markdown spec. This plugin uses pegdown library by sirthias with a few extensions added to make the rendering of GFM more faithful.

For any communications requiring a reply please use the
GitHub Issues page for this plugin. There is no ability to reply to comments left on the JetBrains plugin comment and rate page.

Wiki added with instructions on how to include your GitHub wiki in IntelliJ IDE so you can work on the wiki in the IDE and use the plugin for syntax highlighting,preview, link completions and validation. This makes adding images and manipulating the wiki a lot easier.

Two tier model of the plugin

  1. Previewing and syntax highlighting functionality is available in the Basic open source edition. Intended for mostly previewing markdown documents. Wiki link refactoring and completions are also available in the basic edition to ease the task of wiki maintenance.

  2. Advanced features used for creating and maintaining markdown documents such as split editor, refactoring, find usages, validation, auto formatting and HTML page customizations are only available in the Enhanced licensed version. 30-day free trial licenses are available from idea-multimarkdown page on my website.

Capabilities

Updating of the source

There was much code churn in the enhanced version and I have not had time to merge them into the open source version. Initially when most of the differences were limited to a few files it easy to keep them separated and sync the rest. Now, with major preferences and settings re-work, directory layout changes and new features, the differences have spread out where keeping them in sync is a major effort. I started factoring out the enhanced only changes to separate files so that future synchronization of the two branches can be less time consuming.

I am part way through the task but the formatting wound up being much more intricate than I imagined and it is not leaving me much time to make updates to latest version. I will address it as soon as I have the formatting functionality complete.

Latest Developments: Version 1.4.5

For a full list see the Version Notes

Format and Wrap on Edit

  • As you type formatting for setext header marker equalization and matching atx trailing markers
  • Smart bold/italic doubling
  • Syntax highlight for markdown hard break, two spaces before at the end of line that has a continuation.
new Enhanced Edition features
  • Editor Code Style for Markdown, for now only the format on edit options are implemented

  • Wrap on typing for text blocks, footnotes, list items, definitions with options to align continuation lines:

    • to first line's text (default)
    • no indent
    • indent 1 level
    • indent 2 levels
  • Format as you type for tables with options for:

    • align column widths
    • align column text to reflect column's actual alignment
    • add/remove opening and closing pipes on each row
    • add/remove padding spaces around pipes
    • add/remove/leave left alignment column header marker

    Here is what it looks like with all options enabled:

    Table Auto Format

Latest Developments: Version 1.4.4

Bug Fix Release

  • Fix: #153, #154, #155
  • Fix: settings forms not always disposed
  • Change: References that have reference images referencing them, will have link address completion defaulting to image files

Latest Developments: Version 1.4.3

Minor Improvements & Bug Fixes

  • GitHub issue # completions added in plain text and issues/ link
  • Option to view GitHub page in preview if the document was committed and has not been modified.
  • Added more elements to code folding and added configuration for collapse by default in settings/preferences
  • Improved link completions and added changing of completion addressing format by repeated invocations of the completion action

File Move Refactoring added in 1.4.2

  • Implemented refactoring of links contained in the file being moved. Link format is preserved, wiki links will be changed to explicit links if the file is moved out of the wiki directory.
  • To Keep your links in sync use rename refactoring for:
    • link addresses
    • anchor references and header text
    • references and reference links
  • Intentions implemented to replace annotator quick fixes. Now intentions can be individually disabled and no more weak warning highlighting just to get the quick fix to show up.

Still Great GitHub Rendering Resemblance for your preview pleasure

One of the images is idea-multimarkdown preview, the other of same file on GitHub:

Screen Shot Jfx WebView

Plugins that are a great compliment to idea-multimarkdown

Pipe Table Formatter A plugin that is great for formatting markdown tables. I use to pretty up the tables in markdown and find it a great compliment to idea-multimarkdown.

.gitignore to add .gitignore file brains to the IDE and allows idea-multimarkdown to show files and links to files that will only resolve locally because they are not under git vcs.

The Background

It all started with a desire to see Markdown files in PhpStorm IDE as they would look on GitHub. I was already using
nicoulaj/idea-markdown plugin but found its preview was more like
Craig's List than GitHub. It did not appear to have been recently updated, so I decided to fork it and modify the style sheet it uses. How hard could that be?

I found out quickly that there was more to it than meets the eye. Rendering is done by Java not a browser, the parser is HTML 3.1 and not all features are implemented. Additionally, the Table extension did not work in the version of pegdown used by the plugin. I needed that because maintaining HTML tables is a pain. So I upgraded the plugin to use the latest pegdown, parboiled and fixed a few bugs. Since I was already in the code, I might as well add a few more desired features like user editable style sheet, fix a few more bugs, add updates to preview so that I could split the editor pane and edit in one while seeing the preview in the other.

Then I encountered some bugs in parsing of compound nested lists in pegdown and had to dive into its source to fix them. Having done that and gotten familiar with it, I decided to add a new extension. Finally, to help me with debugging and generating test expectations for pegdown, I had to have the HTML Text tab to display the generated HTML.

It has been a fun trip down the rabbit hole of IntelliJ IDEA plugin development that started with a simple desire for a Markdown preview that looked like GitHub's.

Screenshots

idea-multimarkdown-source

Split your editor and see the preview as you type

idea-multimarkdown

Peek at the HTML

idea-multimarkdown-settings

Change options, customize the syntax colors and CSS to your liking.

Screen Shot Settings Intentions

Screen Shot Settings Color

Screen Shot Settings Markdown

Screen Shot Settings Parser

Screen Shot Settings Css

Screen Shot Settings Html

Forking

This plugin is using a modified version of sirthias, I post my PR's but there is always a delay in both generating them and for them to be merged.

I added a few changes and extensions to the parser. For now I am using my forked copy until the official version has all the features.

The pegdown source used in this plugin can be found vsch/pegdown.


* This plugin is based on the nicoulaj/idea-markdown plugin by nicoulaj, which is based on pegdown library by sirthias.

lasdfj l;asdfj lasdfjlsad;fjlfj l afla