markup icon indicating copy to clipboard operation
markup copied to clipboard

Include file-content as part of markdown.

Open kanuku opened this issue 12 years ago • 139 comments

It would be great if we could include certain lines from another file to be showed inside a mardown file.

For example something like: {5:12}(code/example.java)

Would result in including the specified java file, lines 5 to 12

05. 
06. public static void main(String[] args) {
07.
08.   system.out.println("Hello World!");
09.
10.
11.
12. }

kanuku avatar Aug 16 '14 09:08 kanuku

How would this work if the contents of the file changed? For example, if code/example.java no longer existed on master?

gjtorikian avatar Aug 17 '14 17:08 gjtorikian

Thanks for the suggestion. See https://github.com/github/markup/issues/172#issuecomment-33241601.

bkeepers avatar Sep 03 '14 16:09 bkeepers

This would be a very useful feature...

anthony-cros avatar Sep 09 '16 17:09 anthony-cros

+1

wvangeit avatar Nov 07 '16 13:11 wvangeit

Would be great for boilerplate or site/sub-section wide announcements or sections.

mwpowellhtx avatar Jan 31 '17 18:01 mwpowellhtx

+1

MarcinMoskala avatar Feb 10 '17 07:02 MarcinMoskala

+1

gjrtimmer avatar Feb 17 '17 11:02 gjrtimmer

+1

sschaetz avatar Feb 27 '17 03:02 sschaetz

+1

seanwendt avatar Mar 01 '17 20:03 seanwendt

+1

pcejrowski avatar Mar 20 '17 13:03 pcejrowski

+100000

mghiumiusliu avatar Mar 21 '17 13:03 mghiumiusliu

+1

smeggingsmegger avatar Mar 29 '17 17:03 smeggingsmegger

+1

NicolaiSchmid avatar Mar 30 '17 22:03 NicolaiSchmid

+1

scinfu avatar Mar 31 '17 15:03 scinfu

+1

igorrmotta avatar Apr 02 '17 23:04 igorrmotta

+1 (and it would be great to select language for syntax highlighting for the contents as well)

slayoo avatar Apr 04 '17 11:04 slayoo

+1

brry avatar Apr 06 '17 17:04 brry

+1

roblu avatar Apr 07 '17 06:04 roblu

+1

jgebal avatar Apr 22 '17 16:04 jgebal

+1

chipironcin avatar Apr 28 '17 08:04 chipironcin